SFML community forums
Help => Graphics => Topic started by: Glenn on September 19, 2011, 06:13:10 am
-
So I've just updated to the latest snapshot of SFML 2 and after fixing everything that was broken my app works in debug mode, but not release.
In both cases I am linking to the SFML static builds (-s-d for debug and just -s for release)
When I run in release mode it crashes during initialization.
Here's the call stack:
alphaClient.exe!sf::priv::MutexImpl::Lock() + 0x7 bytes C++
alphaClient.exe!sf::Lock::Lock() + 0x10 bytes C++
alphaClient.exe!sf::GlResource::GlResource() + 0x33 bytes C++
alphaClient.exe!sf::Window::Window() + 0x32 bytes C++
alphaClient.exe!sf::RenderWindow::RenderWindow() + 0x2f bytes C++
alphaClient.exe!App::App() Line 6 + 0x31 bytes C++
alphaClient.exe!main(int argc, char * * argv) Line 15 + 0x26 bytes C++
Here's the exception:
Unhandled exception at 0x777c22c2 in alphaClient.exe: 0xC0000005: Access violation writing location 0x00000004.
I have disabled compiler optimization and rebuilt the libs, but I still can't seem to find the issue.
Anybody have any ideas?
EDIT: If I use dynamic libraries it works fine, so it seems to be some issue with the static libraries, which is odd.
-
Check that you also link -lsfml-main and -lsfml-main-d, also check in wich order you link the libraries.
Also, check that you defined SFML_STATIC.
-
Here are the libraries I link to and in the order I link them:
sfml-graphics-s.lib
sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib
I did define SFML_STATIC
-
Here are the libraries I link to and in the order I link them:
sfml-graphics-s.lib
sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib
I did define SFML_STATIC
Its either:
sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib
sfml-graphics-s.lib
or:
sfml-graphics-s.lib
sfml-window-s.lib
sfml-system-s.lib
sfml-main.lib
Probably the first one, cant remember. You'd find it if you google though.