Project file for Dev-C++...

Questions or HOWTOs about the above? Post 'em here...
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Project file for Dev-C++...

Post by Lan »

Alright, Dev-C++ is for GNU/Linux and for Windows, so I thought I could help people get a jump start on compiling BZFlag with this IDE by sharing my project files. Dev-C++ isn't very popular, but I am trying to help as much as I can.

I have posted files for 1.11.6 and 1.10.x in their respective folders, and the readme tells you where to place the project files so it loads everything correctly.

PS: there is no real purpose why the project files should be placed in /vc6/ or /vc7/ other than that is where dev-c++ can know where the files are, otherwise it can't find any, so it's not because of a windows thing, should work for linux.
User avatar
The Red Baron
Sergeant First Class
Sergeant First Class
Posts: 987
Joined: Sat Dec 07, 2002 6:21 am
Contact:

Post by The Red Baron »

Hello lan...

Are you using Bloodshedds Dev-c++ compiler 4.9.5.0?

I tried compiling bzflag-1.10.6.20040614. Also tried implementing the joystick code.

However, I am a moron when it comes all programming languages, (except for qbasic, then i'm only half a moron:))


is it possible that...

1. I could be lazy and ask some one with the know-how to compile it for me.

Or...

2. Some one walk me through or give the "Complete Idiot's guide to Compiling Bzflag." :D

either way i'm very appreciative.
Beware! I'm going to clone myself and spread those clones all over the world!
User avatar
The Red Baron
Sergeant First Class
Sergeant First Class
Posts: 987
Joined: Sat Dec 07, 2002 6:21 am
Contact:

Post by The Red Baron »

P.S.

I'm using windows 2000!
Beware! I'm going to clone myself and spread those clones all over the world!
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Ahh, it's easy man. But 4.9.5.0 is extinct, get 4.9.8.10. All you do is go up to "File", then "Open", then select "Project file" or something like that title. Then, open one of these project files to compile the respective project, and then just hit F9 to compile. Piece of cake :)
User avatar
The Red Baron
Sergeant First Class
Sergeant First Class
Posts: 987
Joined: Sat Dec 07, 2002 6:21 am
Contact:

Post by The Red Baron »

ah...

Will do that. Thanks for the Help Lan.


*keep those fingers crossed* :)
Beware! I'm going to clone myself and spread those clones all over the world!
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

No problem, I -want- to help people compile it
User avatar
bamf.
Private First Class
Private First Class
Posts: 190
Joined: Mon Dec 09, 2002 2:31 pm
Location: New York
Contact:

compile error

Post by bamf. »

Just for sh*ts and giggles, I thought I'd give compiling the source a whirl. I have zero knowledge of c++ of course. I downloaded the program you referred to, (only found a beta version of 4.9.9.0), your zip file and the source files from sourceforge. Then moved the files according to your instructions, seemed easy enough. I opened up bzflag.dev, went to compile and received one quick error msg. Any ideas?

Thanks. :)
Attachments
error.jpg
error.jpg (17.38 KiB) Viewed 2860 times
It's a good idea to always carry two sacks of something when you walk around. That way, if anybody says: Hey, can you give me a hand? You can say: Sorry, got these sacks.
User avatar
bamf.
Private First Class
Private First Class
Posts: 190
Joined: Mon Dec 09, 2002 2:31 pm
Location: New York
Contact:

new error

Post by bamf. »

found version 4.9.8.0, opened bzflag.dev, tried to compile - received new errors:

Compile log:
Compiler: Default compiler
Building Makefile: "C:\1.10.6\win32\VC6\Makefile.win"
Executing make...
make.exe -f "C:\1.10.6\win32\VC6\Makefile.win" all
g++.exe -c ../../src/bzflag/HUDDialog.cxx -o ../../src/bzflag/HUDDialog.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"../../include" -I"../../win32" -I".//" -D__GNUWIN32__ -W -D_WINDOWS -DWIN32 -D_MBCS -traditional-cpp -w -fsave-memoized -lobjc

In file included from ../../include/common.h:21,
from ../../src/bzflag/HUDDialog.cxx:13:
config.h:73:23: ATLbase.h: No such file or directory
In file included from ../../include/common.h:21,
from ../../src/bzflag/HUDDialog.cxx:13:
config.h: In function `void W32_DEBUG_TRACE(const char*)':
config.h:74: `ATLTRACE' undeclared (first use this function)
config.h:74: (Each undeclared identifier is reported only once for each
function it appears in.)

make.exe: *** [../../src/bzflag/HUDDialog.o] Error 1

Execution terminated
Attachments
error2.jpg
(49 KiB) Downloaded 8 times
It's a good idea to always carry two sacks of something when you walk around. That way, if anybody says: Hey, can you give me a hand? You can say: Sorry, got these sacks.
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

The first error is because you had the wrong version. The second error is because you didn't replace the included common.h in the source package with the one supplied with the project files. That should fix the problem.

The readme.txt will tell you about certain errors when compiling and how to fix them, so read this before compiling.
User avatar
bamf.
Private First Class
Private First Class
Posts: 190
Joined: Mon Dec 09, 2002 2:31 pm
Location: New York
Contact:

Post by bamf. »

lan56, thanks for the reply. Forget the first error msg. On the 2nd error msg you mention replacing the common.h file. Did you mean the config.h file? That is the file included in your zip file (which I replaced in the vc6 directory according to the readme file). I don't see the common.h file (with the exception of the one included in the bzflag source files).

Remember, I'm a database/network guy, not a coder, this is all greek to me. :)

**UPDATE**

I added the config.h file to the include directory, attempted to compile again and got a bit further. That error disappeared, but another one arose :) :

Compile Log:

Compiler: Default compiler
Building Makefile: "C:\1.10.6\win32\VC6\Makefile.win"
Executing make...
make.exe -f "C:\1.10.6\win32\VC6\Makefile.win" all
g++.exe -c ../../src/bzflag/bzflag.cxx -o ../../src/bzflag/bzflag.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include" -I"../../include" -I"../../win32" -I".//" -D__GNUWIN32__ -W -D_WINDOWS -DWIN32 -D_MBCS -traditional-cpp -w -fsave-memoized -lobjc

In file included from ../../src/bzflag/bzflag.cxx:72:
../../include/version.h: In function `const char* getAppVersion()':
../../include/version.h:116: `BZ_BUILD_OS' undeclared (first use this function)
../../include/version.h:116: (Each undeclared identifier is reported only once
for each function it appears in.)

make.exe: *** [../../src/bzflag/bzflag.o] Error 1

Execution terminated
Attachments
error3.jpg
error3.jpg (28.16 KiB) Viewed 2856 times
Last edited by bamf. on Mon Aug 02, 2004 7:46 pm, edited 1 time in total.
It's a good idea to always carry two sacks of something when you walk around. That way, if anybody says: Hey, can you give me a hand? You can say: Sorry, got these sacks.
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Heh, my mistake :) I did indeed mean config.h

I understand it is greek to you, I am that way towards many things as well, so I am willing to help you all the way
User avatar
bamf.
Private First Class
Private First Class
Posts: 190
Joined: Mon Dec 09, 2002 2:31 pm
Location: New York
Contact:

Post by bamf. »

I updated my post at the same time you replied to it, please re-read my last one. Thanks again.
It's a good idea to always carry two sacks of something when you walk around. That way, if anybody says: Hey, can you give me a hand? You can say: Sorry, got these sacks.
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Ahh, this is a sinch :)

Open up "version.h", and replace "BZ_BUILD_OS" with:

"VC7W32"

exactly like that, even with the quotes around it.
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

lan56, for goodness sake - that's a hack, and a bad one :)

#1. You should not have to modify any files outside of the win32 directory to make bz build on any windows platform.

#2. You should not lie about what built your version of BZ. It was not a VC7 build, it was a Dev-C++ build.

Attached is a proper config.h for dev-c++ users, which defines BZ_BUILD_OS, and all the other stuff they need.
Attachments
config.h
Proper dev-c++ config.h
(1.54 KiB) Downloaded 138 times
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

lan56, if your going to maintain thse files, then commit them to CVS

make a new folder in the win32 dir and keep it up to date as a new build type. and as DTRemenak, don't hack it. Make it a proper supported platform.
ImageJeffM
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Sure thing patlabor221. I don't have any other IDE that can compile this (just plainly, there is no other IDE for free for windows), so yes I can commit to mainting these files. DTRemenak, I didn't know what else to put as the build os :) and another thing, mingw32 doesn't come with atlbase.h or any other MFC headers, so that can't be helped without changing things around.
User avatar
EvilChickenNugget
Private First Class
Private First Class
Posts: 160
Joined: Tue Apr 22, 2003 1:35 am
Location: Highland, NY
Contact:

Post by EvilChickenNugget »

Hmm... I may have to try this out. Dev-C++ is a lot less bulky than VC, I'd much rather have it installed than all the MS bloatware.
Image
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

I wouldn't suggest that. Dev-C++ has more bugs than a forest after a fresh rain, and they are so blatant, it is nearly as if releases of Dev-C++ are not tested, but it is really the only IDE for free for windows, mingw-studio is a close contender, but it uses a windows 95 style, and isn't very configurable when it comes to compiler/linker/assembler options, let alone, you can't compile things unless you create an entire project out of it, so it isn't a quick or fast IDE to use IMHO.
User avatar
bamf.
Private First Class
Private First Class
Posts: 190
Joined: Mon Dec 09, 2002 2:31 pm
Location: New York
Contact:

more errors....

Post by bamf. »

Ok, the config.h file replacement got me farther (thank you). Now I have more for you:
:)
Attachments
compile_log_1.txt
(30.66 KiB) Downloaded 101 times
error3.jpg
error3.jpg (134.34 KiB) Viewed 2818 times
It's a good idea to always carry two sacks of something when you walk around. That way, if anybody says: Hey, can you give me a hand? You can say: Sorry, got these sacks.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

all compilers have bugs, but it seems that there is interest in it, so may as well support it proper.
ImageJeffM
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

lan56 wrote:DTRemenak, I didn't know what else to put as the build os :)
When in doubt, imitate what's already there - in this case "W32VC7" consists of the platform (W32) and compiler (VC7), so replace them with your platform (W32) and compiler (Dev-C++). MingW32 under autotools generates "mingw32" for the build os, but it's just as well to have them different, in case bugs specific to one or the other crop up.
lan56 wrote:and another thing, mingw32 doesn't come with atlbase.h or any other MFC headers, so that can't be helped without changing things around.
ATLBase is not needed - VC5 doesn't have a decent implementation either. If you looked at the original VC5/6 config.h, there was an #if to make VC6+ use ATL traces, and VC5 use std::cout. In the config.h I posted, only the std::cout option remains.
Remember, BZ compiles under mingw+msys, which has the same header files. The project files and config.h should be able to take care of everything that's not already taken care of by __MINGW__ defines.
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Post by DTRemenak »

bamf: At a general level, you need either MS' DirectX SDK or SDL. The DX SDK can be downloaded http://download.microsoft.com (search for DirectX SDK), SDL from http://libsdl.org - you only need one of them. I don't know which one lan56 has dev-c++ set up to use, and you'll have to put the header files in the right place.
If this is 1.10.6 you're working on, I take that back, it needs the DX SDK and won't work with SDL :).
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Well, I am not sure if I should mention this, but MinGW32 (which is what Dev-c++ uses), already has all the definitions for DirectX stuff (at least what bzflag uses), so all you need are the headers it says it can't find. A yahoo search will get you these. Place them in c:/dev-cpp/include and recompile.

Patlabor221: sure, everything has bugs, but often times they aren't very blatant or don't occur very often. Dev-c++ crashes or goofs nearly every time I run it, and I don't do very much (or anything at all) out of its intended use to create these crashes/bug occurances. Moreover, the bug tracker on their sf.net project has all the bugs submitted that I have noticed, yet there have been two releases since I started paying attention to the tracker, and not a single bug that I experience has been fixed. Of course I want to use a new IDE, but there are none for free, and I am just not up for purchasing VC++, at least at this point.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

if it's the only free IDE, then go with it.

I'm just saying, that if your gonna post it here. Put it in SF too, so that others can get it by default, and also help keep maintaind. Like DTRs config :)

it may have bugs, but it seems to work for you, so maybe it's a viable solution to those who want an IDE.
ImageJeffM
User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan »

Sure thing, will do ASAP.
Post Reply