Message Boards

Topic: Code::Blocks Compilation Woes  (Read 18422 times)

Offline jezebel

  • Posts: 4
    • View Profile
Code::Blocks Compilation Woes
« on: March 21, 2007, 18:48:22 »
Hey guys.

Here's the lowdown:  I run Windows XP with SP2.  I downloaded the 19th nightly build of Code::Blocks for this month.  I downloaded and installed MinGW and everything that is associated with it, according to the OdaWiki.  Extracted everything into C:\MinGW, including the "include" and "lib" folders for the SDL 1.2.11 and SDL_mixer 1.2.11 files.  I received the latest files from the SVN and put them in a directory.  The OdaWiki states to open Code::Blocks and rebuild the entire workspace, so that is what I did; I attempted to rebuild the workspace that was in the SVN.  Herein lies the problem:  it will compile quite a few files before giving me a warning that says

"Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized",

and three errors that say,

"1)C:\MinGW\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.11\Src\:(.text[_main]+0x55): undefined reference to `_alloca_probe'

2)C:\MinGW\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.11\Src\:(.text[_WinMain@16]+0x181): undefined reference to `_alloca_probe'

3)C:\MinGW\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.11\Src\:(.text[_WinMain@16]+0x1c1): undefined reference to `_alloca_probe' ". 

I am confused as to what this means; I had thought that merely putting all of the necessary SDL files into the MinGW directory would have sufficed.  I googled "sdl codeblocks" and came to a page that said how to install SDL for use with Code::Blocks, so I followed those instructions to see if I could finally link everything.  No go; same warning and errors.

It would be totally tubular if I could get this project compiling so I could play around with it and maybe, hopefully, provide some patch fixes after I've looked into it.  If anyone has any idea what I might be doing wrong, or not doing at all, please shed some light on my situation [sad face]. 

Oh, here's a screen shot of what happened in case I confused anyone.  Thank you for any help in advance.  I'll try to catch someone in #odamex when I get the chance.

Offline RazTK

  • Posts: 11
  • Member
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #1 on: March 22, 2007, 23:57:46 »
First get the latest nightly build.

As for your problem, it looks like you downloaded the Visual C++ development libraries of SDL, and not the ones for MinGW.
« Last Edit: March 23, 2007, 12:54:17 by RazTK »

Offline jezebel

  • Posts: 4
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #2 on: March 24, 2007, 11:30:08 »
Thank you for the help, RazTK; I did have the VC++ versions, and after switching to the MinGW versions much progress was made.

EDIT:  Launcher and master projects run fine.  The only problem I have now is getting the client project and server project to run.  For either debug or release build targets, I keep getting these "process terminated with status -1" messages, with nothing showing up. 

Also, in an attempt to build the workspace as a whole, I receive this error:

Code: [Select]
./src/wx_pch.h:33:23: wx/wxprec.h: No such file or directory

Hmm.. I almost had everything working.

« Last Edit: March 24, 2007, 15:42:33 by jezebel »

Offline Catoptromancy

  • Posts: 3
  • Member
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #3 on: March 25, 2007, 17:25:43 »
I had something similar. Codeblocks would make some folders with a file that is not recognized.
http://img388.imageshack.us/img388/4263/codeblockeryit9.png

Offline RazTK

  • Posts: 11
  • Member
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #4 on: March 26, 2007, 06:41:24 »
Also, in an attempt to build the workspace as a whole, I receive this error:

Code: [Select]
./src/wx_pch.h:33:23: wx/wxprec.h: No such file or directory

Hmm.. I almost had everything working.

Did you get and compile wxWidgets? If yes, open the Odamex workspace, click on 'Settings' -> 'Global variables' and enter the location of your wxWidgets directory (mine is 'C:\wxWidgets-2.8.3') in the base field, so it looks like this.

For either debug or release build targets, I keep getting these "process terminated with status -1" messages, with nothing showing up.

I'm not really sure about this, did you try to run Odamex from the command-line?

EDIT: Okay, I also get the same message when I try to run Odamex with Code::Blocks. In my case, Odamex can't run because it can't find any IWAD (simply because they're not in the same folder). So if this is the case, I suggest you to either copy an IWAD to the same folder of Odamex, or, set the arguments (in 'Project' -> 'Set programs' arguments...') for Code::Blocks to run Odamex with (like this), so Odamex can find an IWAD. Also make sure that you don't forget to copy odamex.wad to the same folder of Odamex (could be the problem too).

And get the latest nightly build because they just fixed a problem with launching programs with Code::Blocks.

I had something similar. Codeblocks would make some folders with a file that is not recognized.
http://img388.imageshack.us/img388/4263/codeblockeryit9.png

Get a nightly build. ;-)
« Last Edit: March 26, 2007, 19:43:25 by RazTK »

Offline jezebel

  • Posts: 4
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #5 on: March 30, 2007, 11:19:37 »
Again, thanks for the help RazTK; I copied the odamex.wad into every folder I could think of in the SVN directory I'm working from, and still I get the same -1 status [for both client and server, release target].  I also tried setting the arguments for the IWADS just as your picture had it, still no go. I'll keep plowing through it and let you know if I get some success.

Also, the previous error I recorded earlier: "./src/wx_pch.h:33:23: wx/wxprec.h: No such file or directory".  This more than likely had to do with me trying to run it as a debug target instead of a release, when I only compiled wxWidgets as a release mode.

Offline RazTK

  • Posts: 11
  • Member
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #6 on: March 30, 2007, 12:44:21 »
Again, thanks for the help RazTK; I copied the odamex.wad into every folder I could think of in the SVN directory I'm working from, and still I get the same -1 status [for both client and server, release target].  I also tried setting the arguments for the IWADS just as your picture had it, still no go. I'll keep plowing through it and let you know if I get some success.

You can check the odamex.out file for any errors Odamex may be outputting; it's in the same folder as Odamex.exe.

Also, the previous error I recorded earlier: "./src/wx_pch.h:33:23: wx/wxprec.h: No such file or directory".  This more than likely had to do with me trying to run it as a debug target instead of a release, when I only compiled wxWidgets as a release mode.

I think so too, I get lots of errors when I try to build the debug target of the launcher.

Offline jezebel

  • Posts: 4
    • View Profile
Re: Code::Blocks Compilation Woes
« Reply #7 on: April 04, 2007, 22:59:02 »
Wow okay, majorly blonde, the only folder I didn't put the doom2 IWAD in was the .bin one.  Once I did that everything worked like a charm, both running from inside and outside Code::Blocks.  Thanks again for your assistance throughout this entire ordeal, RazTK.