Compiling the thing

Questions or HOWTOs about the above? Post 'em here...
Post Reply
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Compiling the thing

Post by RPG » Thu Nov 18, 2004 11:36 pm

Well, i'm a beginner, and all i want to do is compile BZFlag. Right now i've CVS'ed it to my local HD, and I have Dev-C++ (that's it). I set the complie make to makefile.mk (not sure on the extention) in the /bzflag (root) directory. When I click compile, it gives me a 'could not make makefile' error. I'm a beginner, and I don't know this stuff. Again, I just want to a) check out the newest version of BZFlag ... and b) to slightly tweak it for my best interest.

Could somebody who knows more then me please help?

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Thu Nov 18, 2004 11:54 pm

I'm really sorry... i posted this in the wrong place. Could somebody please move this to the BZFlag development section under CVS/Compliling/Development ? Thank you.

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5193
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM » Fri Nov 19, 2004 12:54 am

I think you want to use the projects that are in the dev-C++ folder. You should jsut be able to double click them and then build them.

You want the .DEV files
ImageJeffM

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Fri Nov 19, 2004 2:38 am

I have the right file, bzflag.dev in the dev-C++ folder. I get a compiler error (I think this is not new in the community). The error I get as follows:

LINE: 193
FILE: C:\Dev-Cpp\bzflag\Dev-C++\193
MESSAGE: unable to run program file.

User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan » Fri Nov 19, 2004 3:09 am

Try closing Dev-C++, and instead double-clicking on the .dev file icons directly from the folder in Explorer (do this with Dev-C++ closed), rather than going to File->Open... in Dev-C++. This is a known bug with dev-c++.

I hope you have Windows. If you are using Linux or any other OS, give up--it will never compile, but I doubt you do since the Linux release of Dev-c++ is not usable.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Fri Nov 19, 2004 8:41 pm

The good news is I have Windows XP. The bad news is even when I double click on the .DEV file instead of file > open, it still doesn't work. It has the same error.

Now, I'm a beginner to all of this, and under Compiler Options I saw that you had to choose files to be your gcc, g++, make, etc. I left all of these to their default setting except for make, which I changed to makefile.am in the root directory. I don't know if what I'm saying helps you or not.

User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan » Sat Nov 20, 2004 12:49 am

RPG: yes, I do speak Beginner :) I understand and see your problem. Change the "make" option back to the default ("make.exe" located in your /bin/ folder in the dev-c++ main folder; the "default" button should automatically change it for you though). Those settings in the Compiler Options place are the -applications- that deal with the compilation process, *not* the actual parts of compilation. It is an understandable mistake, I can recall doing the same thing in the beginning.

I am 100% sure that changing the "make" option back to the default will fix this and give you a smooth compilation process.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sun Nov 21, 2004 12:14 am

Yes! I did get a smooth compilation process!

...until it got to the PlatformFactory.cxx file. It pointed out this line:
#include "bzfSDL.h"
And then it gave me all these errors with 'SDL' in each one of them. I guess i need SDL. So I downloaded SDL 1.2.7. Then I unzipped it. I got a SDL.dll file out of that. Now where the heck does that thing go? I don't know where! (Where does it go?)

So I guess it didn't compile. That file just needs to get in the right place, then I'm sure it'll go.

EDIT: Do I download the runtime SDL or the developers SDL?

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sun Nov 21, 2004 12:29 am

Nevermind, nevermind. I got SDL up and running perfectly. Just took a few minutes with the tutorials and I was back on the road of compilation. That is until bzflag.rc got stopped on it's way through the compiler. It stopped on a line that read:
include <windows.h>
and then it told me that:
Line: 14
File: C:\Dev-Cpp\bzflag\Dev-C++\bzflag.rc
Message: [Resource error] parse error
Now I'm stumped. I hope someone will read this thread down the road and all of HIS problems will be solved.

User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan » Sun Nov 21, 2004 6:06 am

While I don't know the problem here because it did work for me and I am unable to recreate it, it can be fixed quite easily. All you have to do, is in the BZFlag project in Dev-C++, remove the file under the subfolder "Resource Files" (to the far left in Dev-C++, where it lists all the files in the project). Click on the plus symbol next to "Resource Files" to show that folder's contents, then right click on the newly displayed "bzflag.rc" title, and select "Remove File". Then recompile. The only difference now is that your compiled executable won't have an icon, but this is no biggy. Other than that, everything will go a-ok after compilation.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sun Nov 21, 2004 3:29 pm

OK, not only did I delete bzflag.rc from the project, Tortise CVS put some weird symbol related to CVS (a yellow arrow) over the file so I just deleted it. From there, it got compiled! Then, after searching for the exectuable file with no luck, I clicked 'compile & run' under Dev C++. I seemed to be running the executable (yay!) until it gave me a 'bzflag error': 'no fonts found. exiting'. Where is this rumored executable running from? Where are the fonts?

User avatar
Memnarch
Sergeant First Class
Sergeant First Class
Posts: 273
Joined: Mon Jul 05, 2004 10:42 pm
Location: Sorry, I'm a Nowhere Man
Contact:

Post by Memnarch » Sun Nov 21, 2004 3:45 pm

I had this same problem, and figure out how to fix it myself. When you compiled the thing, the docs, where all the textures and sounds are, are created. Conveniently, the fonts are located there. So, what you need to do is find the docs, then when you open bzflag, include the argument "-directory /path/to/docs/" That should solve your problem.
Image

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5193
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM » Sun Nov 21, 2004 7:16 pm

or just put the exe at the root level of the bzflag dir and run it manualy. The game expects the data dir to be in the same place as the program.
ImageJeffM

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sun Nov 21, 2004 8:44 pm

OK, put the data directory in the exe directory and... IT STARTS UP!!!!! But it seems like it changed my screen refresh rate (I can see flashes) and theres a black bar on the right side of the screen, not to mention the computer locking up beyond recovery. So I guess it worked, then it got tired of working, and stopped.

User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan » Sun Nov 21, 2004 9:03 pm

RPG: I'd say those are 1.12 errors, or hardware mess ups; it's still a prototype :) But bugs are fixed all the time, so I can probably bet that it should be working pretty soon. I get mess ups like that all the time, none of them have I fixed myself, but eventually they went away. Sometimes a complete rebuild after a CVS update works, but I can't guarantee it, but indeed it has worked for me occasionally.

One thing you can do now is to try out Patlabor221's builds (http://bzbb.bzflag.org/builds IIRC, get the latest build), try that out, see if it does anything different than the dev-C++ build. While this may not solve anything, it can give an idea. If the differences are interesting, post it here; there is probably a reasonable solution.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG » Sun Nov 21, 2004 9:37 pm

Ok, at least im a compiler now! However I can't access http://bzbb.bzflag.org/builds, it says 'ACCESS FORBIDDEN' in taunting letters.

I'll keep CVSing until I get a good build, then I can report back to everyone else with the bugs & marvles. Heck, I could take on the name of 'tester'! I'll work on writing a long post on the steps I went through to get it compiled successfully, for all the others out there.

User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

How I Solved my Probmem

Post by RPG » Sun Nov 21, 2004 9:45 pm

How I solved all my compiling problems:
for the average Windows user using Dev-C++

...before I could even compile
1. ERROR: Unable to run program file.
This error came before I could compile anything. The fix: Go into the Compiler options in Dev C++, Directories tab, Binaries subtab. Make sure that C:\Dev-Cpp\bin (or your path, as long as \bin is the last directory) is the very first line on the list, if not the only line. You should only change this to a different path if you use a different compiler.

...about halfway through the compiling process
2. ERROR: #include "bzfSDL.h" line in PlatformFactory.cxx
This error happened because I didn't have SDL installed. I quickly fixed this by myself by downloading SDL from http://www.libsdl.org/release/SDL-devel-1.2.7-VC6.zip . You also have to download the runtime SDL from http://www.libsdl.org/release/SDL-1.2.7-win32.zip . Put the runtime SDL .dll file in your C:\windows\system directory. You will also have to read the tutorial on how to implement the SDL into Dev-C++ at http://pgdc.purdue.org/sdltutorial/sdl_setup.html . It was written for Microsoft Visual Studio .NET, but the basics are the same for Dev-C++.

...it's almost done compiling
3. ERROR: [Resource error] parse error in bzflag.rc
This error seemed to be unknown to the BZFlag community, so the response was just to delete the file. All the bzflag.rc file does is add the icon to the executable, not that important. To delete it, go to the Resource Files folder under the Project tab. Right click on the bzflag.rc file. Choose 'Remove from project'. To be sure, also delete it from you hard drive.

...its done! but where is it?
4. ERROR: BZFlag error: no fonts found. exiting.
This error is completely fixable. What you have to do is go into the ../bzflag/src/bzflag/ and find the file bzflag.exe. (it does not have the tank icon, you deleted bzflag.rc.). You can move that to the root directory. (/bzflag/) Now the .exe file can pull it's data from the data folder, which should be in the root directory also.

...im running BZFlag
5. Basically, once you get BZFlag running, you're done with this part. If it looks weird or twisted or doesn't work, it's the current version, and it will probably be fixed soon. Just keep updating your CVS and compiling, hopefully you'll get a working version to test/play on.

Thanks to lan56, Patlabor221, and myself.
Last edited by RPG on Wed Nov 24, 2004 10:37 pm, edited 2 times in total.

User avatar
Lan
Private First Class
Private First Class
Posts: 296
Joined: Sun Jun 13, 2004 1:21 am
Contact:

Post by Lan » Mon Nov 22, 2004 1:38 am

Impressive doc, I like it.

Post Reply