0

I am trying to update an old C language 2-D game named Boomtown (an arcade-style Bomberman knockoff!) that uses glut and OpenGL and no longer compiles with the latest version of Code::Blocks. I am trying to add the source files into the src/ folder of the project itself but I'm getting a crash. Any help is much appreciated! I'll try to include as much info about the project as I can.

Project layout:
Name of project folder: boomtown
Located inside boomtown\src:
boomtown.cbp
include\
lib\
old version of glut32.lib (Not sure exactly how this was used in the old setup)

Other info
OS: Windows 7 64-bit (but trying to set the project up using the x86 glut resources)
CodeBlocks Version: 12.11
Compiler: GNU GCC Compiler

Here is what I have done so far:

[Glut]

  • Downloaded glut32.dll glut.h and glut32.lib
  • Added glut32.dll and glut.h into the boomtown\src\include folder
  • Added glut32.lib into the boomtown\src\lib folder
  • Replaced old glut32.lib with new (Just in case)

[OpenGL]

  • Added SFML source into the boomtown\src\include folder
  • Added SFML library files into the boomtown\src\lib folder

[CodeBlocks]

  • Project->Build Options->Linker settings->Link libraries: lib\glut32.lib and all SFML.a files there
  • Project->Build Options->Linker settings->Search directories->Compiler/Linker: \boomtown\src\
  • Added boomtown\src\include\glut.h to Project workspace
  • Added boomtown\src\include\SFML header files into Project workspace

When I build and run I get no errors (woohoo!), but a blank debug window comes up and I get this:

boomtown.exe - Application Error  
The application was unable to start correctly (0xc0000be).  Click OK to close the application.

If everything works correctly, the game should pop up rather than the Application Error. Any help is appreciated!

4

1 回答 1

0

您必须确保您的库以正确的顺序链接:

正确的顺序是:

    -lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32

当然 -lwinmm 和 -lgdi32 可能不是必需的。glut32 需要 glu32,而后者又需要 opengl32

尝试设置你的项目->构建选项->链接器设置->链接库:到

lib\glut32.lib lib\glu32.lib lib\opengl32.lib 

ETC...

于 2013-07-28T23:49:26.290 回答