#include <iostream>
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
Which was provided on the SFML website as a test.
I am compiling with mingw, code::blocks, the following linker options;
-lsfml-graphics
-lsfml-window
-lsfml-system
And the #define SFML_STATIC.
It compiles, and runs, so long as I have three certain dll files (each name corresponding to one of the three libraries i'm linking) in the same directory that run it from. I want to compile it so that I don't need these dlls, and everything is packed into one exe, but am unsure how.
When I try to append '-s' to any of the linker options other than -lsfml-system, the compilation fails. I think I maybe be missing some of the dependencies listed here: http://www.sfml-dev.org/tutorials/2.2/start-cb.php (about 3/4 of the way down)?