0

With Microsoft Visual Studio 2012, I have a project (https://github.com/ThrosturX/freespace/), I can build this project using the Debug build configuration -- interactive stars in the background, a planet and a controllable space ship.

However, when I build with the Release configuration, nothing is rendered on the screen -- it is simply rendered black. The window is created, however, and my hooks (while(SDL_PollEvent(&e))) seem to be working, since Escape terminates the program, as does pressing the x at the top of the window to close it.

Attempting to find the root of this cause, I created a new build configuration dist which used Debug as a template (thus copying Debug exactly, I assume). Attempting to build and run the program with this build configuration, however, behaves exactly as with the Release build configuration -- only black is rendered in the window.

My project uses SDL2 to render graphics. Please let me know what information I can supply to help diagnose the problem. Any ideas?

Update: I have found that adding a few dll's that are in my \lib folder to the output directory ("Release") fixes the issue, so I now just have to find out how to bundle all of the dll's into the .exe properly.

abanana
  • 140
  • 2
  • 10
  • I'm guessing, but usually when I see this sort of behavior its because some variable has not been initialized. The uninitialized value may be stable in some build for months depending on where it lands in the stack. Changing platform or building on someone else's machine may initialized it as a different value. – Tom Kerr Sep 22 '13 at 19:04
  • @TomKerr Actually I've managed to narrow it down a little, these 2 DLL's need to be in the same directory as the executable for it to work: `libpng16-16.dll` and `zlib1.dll`. I think my problem is just packing these dependencies into the executable, I thought it would pack everything from \lib into the .exe. – abanana Sep 22 '13 at 21:24

0 Answers0