SFML community forums
Help => General => Topic started by: WiltedChameleon on May 29, 2012, 08:40:54 pm
-
I've been running SFML in this project fine for a while now.
I'm using precompiled SFML 2.0 stuff compiled for VS2010, (Although I'm using VS11, they work fine, I guess VS2010 and VS11 aren't too different compiling-wise), and I've encountered nothing like this so far.
The full error is:
Unhandled exception at 0x7596FEB8 (KernelBase.dll) in sfmlt.exe: 0xC0000005: Access violation reading location 0x6E697720
VS11 is highlighting this line:
sf::RenderWindow window(sf::VideoMode(1000, 800), "SFML window");
I haven't changed anything since it was building fine other than trying to compile with static libraries, but I kept messing up so I just went back to the regular ones.
While I'm here, every time I use the application on another computer it cries about MSVCR100.dll or something, can I package this with my application?
Edit:
My external dependencies is as follows:
sfml-system-d.lib
sfml-window-d.lib
sfml-graphics-d.lib
sfml-audio-d.lib
sfml-network-d.lib
sfml-main-d.lib
opengl32.lib
My #includes are as follows:
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/OpenGL.hpp>
#include <iostream>
#include "GIMap.h"
Edit:
Graphics Card:AMD Radeon HD 6670
OS:Windows 7 Home Premium 64-bit
I'm using dynamic libraries (As can be assumed from my post's body above this)
-
I guess VS2010 and VS11 aren't too different compiling-wise
Unhandled exception at 0x7596FEB8 (KernelBase.dll) in sfmlt.exe: 0xC0000005: Access violation reading location 0x6E697720
Conclusion? ;)
While I'm here, every time I use the application on another computer it cries about MSVCR100.dll or something, can I package this with my application?
No, but your users can install the "Visual C++ redistributables" (you can download them on the MSDN).
-
But it's been working perfectly before now, literally five minutes before I posted the message it was compiling and running fine.
I changed all my external dependencies to try using statics, but I ended up with a couple of (hundred) errors about redefining functions, so I decided I'd stick with dynamic for the time being, and when I removed the -s from all my references, it stopped working as it had been before. :'(
-
Ah, that's why
I'd changed the runtime library for some reason, and afterwards I must've wanted to change it back, and since it boldens non-default settings, I'd gone through the whole dropdown box and not got an unbolded one so I left it blank (I guess I thought this would make it go back to the default)
Switching it to "Multi-threaded Debug DLL (/MDd)" fixed it again.
Sorry for using your time, Laurent, I should've double checked all this before I asked. Congratulations on making such an awesome library though.
-
I'm glad you found the error.
And it's good to know that VC++ 2011 is binary compatible with VC++ 2010 (finally!) :)