Compiling

Questions or HOWTOs about the above? Post 'em here...
Post Reply
User avatar
Evanejk
Private First Class
Private First Class
Posts: 88
Joined: Wed May 09, 2007 3:59 pm
Location: USA (Maine)

Compiling

Post by Evanejk »

I'm starting to get into c++ and I downloaded a compiler. (http://www.bloodshed.net/devcpp.html). I was wondering how you compile the open source into a working program.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

Assuming you're talking about BZFlag, the Dev-C++ project files are no longer supported afaik. You'll probably have better luck with Visual C++ Express Edition 2005. There will be quite a bit to download in order to get BZFlag to build, so hopefully you have broadband. (Platform SDK, DirectX SDK, cURL, etc)

If you are just wanting to learn how to code in C++, I would recommend you start with simple applications and tutorials, not looking at a codebase that's over 10 years old.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
angryfirelord
Private First Class
Private First Class
Posts: 23
Joined: Fri Dec 15, 2006 12:29 am

Post by angryfirelord »

It'll take you a little while to get up to that speed. I would grab a copy of Sam's Teach yourself C++ In 21 Days and see if you like it afterwards.
F687/s
Private First Class
Private First Class
Posts: 369
Joined: Sun Dec 31, 2006 8:30 pm

Post by F687/s »

> I'm starting to get into c++ and I downloaded a compiler.
> (http://www.bloodshed.net/devcpp.html). I was wondering how you compile
> the open source into a working program.


By using Dev-C++, I assume you're using Windows. One of the problems of using Windows is that BZFlag has all sorts of dependencies (SDL, OpenGL, Ares, cURL, etc), and while some come bundled, others must be downloaded separately. I'm just cringing at the thought of downloading and installing all of those dependencies for Windows (take some time to thank the developers for doing that for you).

An alternative might be to grab the Cygwin and MinGW32 packages and run ./configure and make like a real Unix user. From my experience, however, Windows and Unix don't mix *well.* There's also the VC++ makefiles that can be used, though I'm not sure they can be loaded into Dev-C++.

> I would grab a copy of Sam's Teach yourself C++ In 21 Days and see if you like it afterwards.

I remember reading that book...I sure hope you know another language besides C++.

(NOTE: It's been a while since I've worked with Windows, so some of my knowledge might be a little stale)
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast »

F687/s wrote:By using Dev-C++, I assume you're using Windows. One of the problems of using Windows is that BZFlag has all sorts of dependencies (SDL, OpenGL, Ares, cURL, etc), and while some come bundled, others must be downloaded separately. I'm just cringing at the thought of downloading and installing all of those dependencies for Windows (take some time to thank the developers for doing that for you).
Building isn't for the light of heart. But really, there isn't THAT much to install for dependencies. They need libcurl, pdcurses (optional I think), and glew. Yeah, that's a whole ton of stuff. I feel sorry for anyone building. OpenGL is part of their compiler, and Ares is included in our source tree.

Linux needs the same deps (swap pdcurses with ncurses), plus SDL (optional, depending if the native stuff builds) and libtool (for plugins).
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
Evanejk
Private First Class
Private First Class
Posts: 88
Joined: Wed May 09, 2007 3:59 pm
Location: USA (Maine)

THANKS!!!

Post by Evanejk »

:D Ok thanks I ordered the book you suggested and c++ for dummies from amazon. Online I've been looking at http://www.cprogramming.com/tutorial
I'm on "Lesson 4: Functions" right now and I seem to be understanding it. I made my first two programs to test out what I learned so far and they both work. (No they aren't one of those stupid HELLO WORLD ones.) I feel that I understand the way the language works very well for my 2nd day of even looking at it :wink: . Man making bzflag must of took soooooooooo long to finish now that I know what they must of gone through. I hope that I might become good enough some day to be able to give back to bzflag. My brother got caught on one server using the key that makes lag if your using it wrong :roll: ; so if I ever get to be able to compile bzflag I'm going to take away the function of the key and replace the compiled client with the one he is using :twisted: . Thanks for the suggestions.
Post Reply