project-navigation
Personal tools

Author Topic: Compiling with DEV-CPP  (Read 6736 times)

Offline Red

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Compiling with DEV-CPP
« 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  :)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Compiling with DEV-CPP
« Reply #1 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

Offline Zenerka

  • Sergeant
  • *****
  • Posts: 301
    • View Profile
Re: Compiling with DEV-CPP
« Reply #2 on: September 04, 2007, 11:04:42 am »
Red, all devcpp project files should be fixed in current trunk. Can you verify?

Offline smalul

  • Rookie
  • ***
  • Posts: 35
    • View Profile
Re: Compiling with DEV-CPP
« Reply #3 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).

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Compiling with DEV-CPP
« Reply #4 on: September 04, 2007, 07:22:54 pm »
even that is not reproducible here

Offline Red

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Compiling with DEV-CPP
« Reply #5 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...

Offline Red

  • Cannon Fodder
  • **
  • Posts: 3
    • View Profile
Re: Compiling with DEV-CPP
« Reply #6 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 :)

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
Re: Compiling with DEV-CPP
« Reply #7 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

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Compiling with DEV-CPP
« Reply #8 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

Offline lfloden

  • Rookie
  • ***
  • Posts: 68
    • View Profile
Re: Compiling with DEV-CPP
« Reply #9 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?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Compiling with DEV-CPP
« Reply #10 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

Offline smalul

  • Rookie
  • ***
  • Posts: 35
    • View Profile
Re: Compiling with DEV-CPP
« Reply #11 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).
« Last Edit: October 07, 2007, 08:00:52 pm by smalul »

Punkiee

  • Guest
Re: Compiling with DEV-CPP
« Reply #12 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.