I am using Win7 x64 Ultimate and MSVS 2010, compiling in 32-bit.
My code compiles flawlessly. I've linked the debug compile to the debug .lib's and used the debug .dll's, as well as the regular ones for the release compile.
My problem comes in when I try to use Image::LoadFromFile(). I stripped it all down and tried it as well. Cleared my builds, full rebuilds, both debug and release. Nothing.
When I go to run it I get...
Debug:
---------------------------
Neptune.exe - Application Error
---------------------------
The application was unable to start correctly (0xc0150002). Click OK to close the application.
---------------------------
OK
---------------------------
Release:
I get a program crash, and it goes back and points to the Image::LoadFromFile() line. I can't even debug the debug version. I debug the release version and it says this about the LoadFromFile() line:
"Unhandled exception at 0x73da0149 in Neptune.exe: 0xC0000005: Access violation reading location 0x706d622e."
It's just a simple LoadFromFile() call. I'm not sure what's going on here. So I did a simple test:
#include <SFML\Graphics.hpp>
using namespace sf;
void main(){
RenderWindow App(VideoMode(1024,768), "TEST!");
Image img;
img.LoadFromFile("neon.bmp");
Sprite imgSprite(img);
while(App.IsOpened()){
//Process events
Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == Event::Closed)
App.Close();
}
App.Draw(imgSprite);
// Clear the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
}
Again, the debug compile fails to start no matter how I try to run it. The release compilation crashes unexpectedly and says:
"A buffer overrun has occurred in sfml-test.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'."
And catches on some line in gs_report.c inside the compiler.
So I'm stumped. I'm guessing there is something wrong with SFML here and not me? Maybe that, or SFML doesn't play nice with MSVS 2010 and/or Win 7?