First of all hello to everyone.
I'm having issues when trying to static link an example program.
I'm using this version of sfml -> GCC 7.3.0 MinGW (DW2) - 32-bit
and this mingw -> MinGW Builds 7.3.0 (32-bit)
g++ --version output
g++ <i686-posix-dwarf-rev0, Built by MinGW-W64 project> 7.3.0
dir structure:
sfml dir -> C:\sfml\
include dir -> C:\sfml\include
lib dir -> C:\sfml\lib
g++ -c main.cpp -I"C:\sfml\include"
goes fine
g++ main.o -o main.exe -DSFML_STATIC -L"C:\sfml\lib" -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
this leaves me with undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale' and bunch of others
Code in question is standard tutorial example
#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;
}
Can anyone point me what I'm doing wrong?