I've been setting up a basic SFML program in Code::Blocks using the static library, but I've been stuck at this seg fault problem.
Using debug I've found out that my app object gets the variables in a strange order:
sf::VideoMode::VideoMode(this=0x320, modeWidth=600, modeHeight=32, modeBitsPerPixel=1980298368)
As you can see,
this gets the value 0x320 (which is 800 decimal)
modeWidth gets 600, but should get 800,
modeHeight gets 32 but should get 600, etc. All the parameters are in the wrong place! :I
The project can be found on
https://github.com/DavidHulsmanNL/Graphicsmain.cpp currently only contains this:
#include <SFML/Graphics.hpp>
int main()
{
sf::Window app( sf::VideoMode(800,600), "SFML window" );
return 0;
}
I've added SFML_STATIC to the #defines in the build options and I've added the static libraries to the correct linker settings.
I've never been able to setup SFML using static libraries, so I'll need some help
If I forgot anything, ask away!