SFML community forums

Help => General => Topic started by: void on March 15, 2013, 01:13:24 am

Title: SFML2 with mingw
Post by: void on March 15, 2013, 01:13:24 am
Hi

For a short time I'm far a way from my Linux machine so I decided to use the same code under Windows.
I've installed mingw, everything compiles and links fine.

Then an error comes from code:
 sf::VideoMode vm(600, 500, 32);
That's the beginning of my program (temporary to pinpoint the problem)

Program received signal SIGSEGV, Segmentation fault.
0x691c2811 in sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int) ()

Who there can be a segfault within that function?:
VideoMode::VideoMode(unsigned int modeWidth, unsigned int modeHeight, unsigned int modeBitsPerPixel) :
width       (modeWidth),
height      (modeHeight),
bitsPerPixel(modeBitsPerPixel)
{

}
 
Title: Re: SFML2 with mingw
Post by: eXpl0it3r on March 15, 2013, 01:21:02 am
Make sure the binaries are compatible and you're not mixing debug and release modes or static and dynamic builds.

If you're using the latest MinGW version (4.7.x) and the RC from the download page, then things won't work and you'll have to recompile SFML (or use my nightly builds). ;)
Title: Re: SFML2 with mingw
Post by: void on March 16, 2013, 10:13:26 am
Thanks, I'll try to assemble more compatible development environment.