Skip to main content
GameDev.net gamedev.net
🔒 Locked

what now?

Started by kickkick Jun 28, 2006 at 6:02 PM 19 replies 9.3k views
Original Post
kickkick
kickkick
Hi, I've finished reading a book on C/C++, I'm ready to program. The holdup is that I can't seem to get any larger project compiled! I thought it would be easier. (As you know books like this only show small programming examples, and teach you how to create a basic console application.) Although I have learned basically everything and I should understand any other code, I just don't know where where the errors come from. I've tried a lot of things. Downloaded the Quake 3 engine source code, compilation error, Tremulous, error, I even searched the FreeBSD ports collection for even the stupidest game and I can't compile it. I used the following compilers: Digital Mars C/C++ compiler, MinGW GCC, Visual Studio 2005 Express .. maybe it's because these suck. Perhaps I'm just knew to something I don't know. WTF is a Makefile? I sure hope every programmer's first day was like mine. So I'm asking someone to show me a full process of compiling a larger project. What source to download, what compiler to use and what libraries to implement and how? Or I can just tell what I'm doing so you can tell what I'm doing wrong... I thank you all in advance.
Enselic
Enselic
If you download source for a larger app, the readme.txt or similar often have step by step instructions on how to make a binary out of the stuff you just downloaded.

Often, it is more work than just opening up the project file in an IDE and pressing 'Build project'.

If you encounter a word you've never heard of (like Makefile) it is a good chance that word will be explained on Wikipedia, so just look it up there.
kickkick
kickkick
Well, that's what I thought, just one press and presto ... silly dreams. I'll browse readmes and the web for info on building.

Meanwhile, has anyone built the Quake3 or Tremulous?
Palidine
Palidine
Quote:
Original post by kickkick
WTF is a Makefile? I sure hope every programmer's first day was like mine.


a Makefile is a mechanism by which you get projects with multiple files to compile if you aren't using an IDE like visual studio. It's basically a sequence of things for the machine to do in order to build the project: it inclues dependency information so the compiler can "know" that if you touch file A, files B, C and D also have to be re-compiled.

http://vertigo.hsrl.rutgers.edu/ug/make_help.html

-me
Zakwayda
Zakwayda
Quote:
Original post by kickkick
Meanwhile, has anyone built the Quake3 or Tremulous?
I've built and worked with the Q3 source code, but I used the included Xcode project, which is kind of cheating :-) If you're having problems compiling it though, you might post some of the errors you're getting; I'm sure you could get some help from the folks on these forums.
kickkick
kickkick
OK, I know what's a Makefile.

Here's what I just did:
1. downloaded the quake 3 source
2. opened it with VC2005 express, converted the project from the 2003 to the 2005 format
3. compiled it... 2 succeded, 6 failed
There were a bunch of errors saying that 'windows.h' isn't found.
(Also, bunch of warnings about old, deprecated functions)

So .. change it to 'windows'?
Or does this goddamn free compiler not support applications that open windows?
darookie
darookie
Quote:
Original post by kickkick
So .. change it to 'windows'?
Or does this goddamn free compiler not support applications that open windows?

You need to download, install and setup the Windows Platform SDK
It's all there and explained on the site - no offense, but if you lack the patience to even read crucial information on your (free!!!) tools, you will have a hard time writing games (or any complex application for that matter).

Good luck,
Pat.
kickkick
kickkick
Tried something to remedy this windows.h stuff.
I still have the old Visual Studio 6, so I replaced the libraries and include files of the VC2005E with the one in VS6, and tried to compile.
Surprisingly, the files did compile without an error, however, in the end there were a lot of unresolved links.
kickkick
kickkick
So what is this platform sdk? The whole thing is like 400 MB in size! Is there an alternative?
kickkick
kickkick
OK, so I've downloaded the the SDK and done instructions.
The compilation results got better: 4 succeeded, 2 failed. Error: 'dinput.h' not found.
Then I searched for this file, and found that it's neither contained in the VC2005, nor in the SDK. (Actually I found a header dinput.h in the old Visual Studio 6.)
Any suggestions?
CrashStar
CrashStar
hmm, dont really know what file is that, but try googleing for it
kickkick
kickkick
Next, I'm going to download the DirectX SDK... another 450 MB.
Acid-Chris
Acid-Chris
Depends on what open source projects you're going to compile you'll probably need following libraries too:

- libsdl (platform independant framework)
- libjpeg (image loading)
- libpng (image loading)
- libxml (xml parsing / writing)
- zlib (compression lib)
- freetype (font library)
- stlport (STL port for other platforms)
- opengl (platform independant graphics api, you probably need glext.h)
- openal (audio)
- fmod (audio)
- bass (audio)
- dozens more :)
Most of them are fully open source (and require a compilation for your platform in order to use it) or provide a SDK at least.

About the "declared deprecated" compile warnings...you can ignore them.
VS2003 (i think) and VS2005 ship with a more accurate standard library where the functions have some security mechanisms like buffer sizes for example.
These new functions have another parameter set or use error code return values.

But, of course, to be backwards compatible they still need the 'old' ones in the library.

Hope this helps!

best regards,
- christoph -
kickkick
kickkick
Thanks for sharing these libraries with me. Some of them I know from being included in open source projects.

With the DirectX SDK, results have improved! Now, it's just one error. Here it is:
winquake.rc: cannot open include file 'winres.h'.
A simple file shearch show that I do have this file in the compiler's include directory. What the?
winquake.rc is commented as a Microsoft Developer Studio generated resource script. What could that be?

Just a little more help needed.
kickkick
kickkick
Finally, removing the winquake.rc from the compilation solved it. YAY! quake3.exe doesn't have an icon, but all that matters is that i have a working executable.
Of course, someone can still help me solve the mistery about the winres.h in the winquake.rc file.
kickkick
kickkick
In our next campaing, let's compile the game called Tremulous. It uses a modified q3 engine.

Here's what I've done so far:
Compiling with the DMC yielded #error "Platform/whatever not supported".
I looked at the header files, the game will only compile on Windows when MINGW or MSVC is used. In MinGW, I guess I have to run the Makefile. Can someone please show me how that's done? In Visual C++, well, the Quake 3 is divided into q3_ui and renderer for example, and that is done already. But in Tremulous, I don't know what with what I should link. A little help please?
Also, is there a way to compile it on different copilers?

thx
Acid-Chris
Acid-Chris
hi!

winres.h
this file just contains the constand ID's for all resource files in a project.
if you going to build a MFC program for example using the app wizard, it'll create this file for you.

cannot open include file:
check the source files where the winres.h is being included. check the #include "path_to_winres.h/winres.h" for a valid path.
and last but not least...make sure the winres.h is in the project itself.

makefile:
i'm also not the guru of using makefiles. i leared much while reading the readme files included in the libraries i listed a few posts above. because most of them compile on different platforms, compiler setup instructions and usage is included in most of them.

good luck in your "mission" ;)

regards,
- christoph -
kickkick
kickkick
Copying the file to the project yields some really dumb errors. Think I'm going to get the 2005 standard edition. I bet it's way better.
I just needed to add another \mfc include directory to the VC2005E. Now everything compiles.

Still, I don't have a good way to compile Tremulous and I still need help (there is nothing in the readme files that could help me or anyone else for that matter).
estrose
estrose
I got quake compiled finally, thanks for page:

http://www.quakesrc.org/forums/viewtopic.php?t=5530&view=next&sid=8306b81a554c96878725e53888ff04f1

There is step 4 i missed before.

Thanks for reading this...



Hello.

I just downloaded quake3-1.32b source code. I installed Platform SDK (PSDK-x86.exe) into my computer, and Direct X (dxsdk_jun2006.exe) and Visual Studio 2005. I copyed Direct X Lib and Inc folders' contents into visual C inc/lib folders, under VS projects i added for compiler additional directory path to the Direct X Lib folder, maybe ot wasn't needed but it's not a problem i think.

I opened "quake3-1.32b\code\quake3.sln" and pressed "rebuild solution", the result was:
Rebuild All: Rebuild All: 7 succeeded, 1 failed, 0 skipped

The compilation proccess gave such log:

http://charles.pri.ee/failid/rebuild.txt

Error message:
"
>------ Build started: Project: q3_ui, Configuration: Debug TA Win32 ------
1>Linking...
1>ui.def : error LNK2001: unresolved external symbol vmMain
1>Debug_TA/uix86.lib : fatal error LNK1120: 1 unresolved externals
"

Any ideas?

[Edited by - estrose on July 18, 2006 9:53:03 AM]
Lars Junered
Lars Junered
Hello!

Is there anyone who knows why mesh viewer have been replaced with DirectX viewer in dxsdk_jun06 ?

DirectX viewer shows not the animation in my animated mesh. Can't find any options either to put on animation view.

Thank you for your answer

LJ

larjun

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.