UFO:Alien Invasion

Development => Coding => Topic started by: Red on September 02, 2007, 07:07:07 pm

Title: Compiling with DEV-CPP
Post by: Red on September 02, 2007, 07:07:07 pm
Hi,

I'm trying to compile code with DEV-CPP. I've all devpacks mentioned in compilation howto. Compilation is ok, but I'm unable to link it. The problem is, I think, that some directories (shared, common) are not compiled to libraries, thus compilation fails. For example, I'd like to compile game project, but it says that "Info_ValueForKey" is unknown. Am I doing something wrong or DEV-CPP was not tested. Please tell me what should I do  :)
Title: Re: Compiling with DEV-CPP
Post by: Mattn on September 02, 2007, 07:42:29 pm
the dev-cpp project files are currently broken - and our windows coders are in vacations right now - add the missing files to the project files (shared/infostring.c in this case) or wait a few days until they returned
Title: Re: Compiling with DEV-CPP
Post by: Zenerka on September 04, 2007, 11:04:42 am
Red, all devcpp project files should be fixed in current trunk. Can you verify?
Title: Re: Compiling with DEV-CPP
Post by: smalul on September 04, 2007, 04:20:08 pm
I can confirm that - everything is working fine in Dev-C++, except for that ref_gl.dev problem I reported in the bug tracker (the files get compiled in the wrong directory).
Title: Re: Compiling with DEV-CPP
Post by: Mattn on September 04, 2007, 07:22:54 pm
even that is not reproducible here
Title: Re: Compiling with DEV-CPP
Post by: Red on September 04, 2007, 10:58:19 pm
Red, all devcpp project files should be fixed in current trunk. Can you verify?
I can see now that smalul have verified that. I've successfuly used codeblocks and I had to add only two #ifdef's (line 427 and 430 in FS_Read routine, files.c) and #include "msg.h" in win_main.c Anyway I'll check it too with DEV-CPP... as soon as my centrino 2Ghz will finish maps compilation :) I takes hours...
Title: Re: Compiling with DEV-CPP
Post by: Red on September 04, 2007, 11:28:11 pm
Ok, DEV-CPP works perfectly. Please forget my last hint about msg.h include, I missed that it was included few lines above, I don't know how it could help me :)
Title: Re: Compiling with DEV-CPP
Post by: lfloden on September 21, 2007, 02:10:40 am
I get this when compiling, I must be missing something...

 -lkernel32  -luser32  -lgdi32  -lgmon -lintl  -lSDL -lSDL_ttf -lz -lpng -ljpeg -lws2_32  -g3

/mingw/lib/crt2.o(.text+0x16a):crt1.c: undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status

make.exe: *** [../../ufo.exe] Error 1

Execution terminated
Title: Re: Compiling with DEV-CPP
Post by: Mattn on September 21, 2007, 07:35:00 am
i don't know, but i think it's an old mingw installation - try to update or use the prepackages codeblocks package (it includes all you need to compile ufo + a nice ide)

see http://ufoai.ninex.info/wiki/index.php/Code::Blocks
Title: Re: Compiling with DEV-CPP
Post by: lfloden on October 07, 2007, 06:50:58 pm
Downloaded and setup code blocks and it still gives me that __cpu_features_init error. Plus, where are all the dll files for the game in codeblocks? Does it only need the 4 project files?
Title: Re: Compiling with DEV-CPP
Post by: Mattn on October 07, 2007, 07:07:38 pm
you only have to open the workspace, there is only a game.dll - no more dll's are needed
Title: Re: Compiling with DEV-CPP
Post by: smalul on October 07, 2007, 07:59:07 pm
Downloaded and setup code blocks and it still gives me that __cpu_features_init error.
I have this problem too - ufo2map.cbp just won't compile (the rest of the files are working just fine). I posted about it here:
http://ufoai.ninex.info/forum/index.php?topic=1864.0
No one can find a solution to the problem (I've installed code::blocks a few times, but the problem continues).
Title: Re: Compiling with DEV-CPP
Post by: Punkiee on October 07, 2007, 08:06:16 pm
I have this problem too - ufo2map.cbp just won't compile (the rest of the files are working just fine). I posted about it here:
http://ufoai.ninex.info/forum/index.php?topic=1864.0
No one can find a solution to the problem (I've installed code::blocks a few times, but the problem continues).

I can only hint at it again that most of the times this is due to
*bad/old mingw installation
*mingw directory not in %PATH%
*a second mingw library somewhere on your system. This might be hidden in another dev project or even in an application.