Building against the current git head, which compiled fine with cmake and mingw
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime().AsSeconds() < 5.f)
{
std::cout << Clock.GetElapsedTime().AsSeconds() << std::endl;
sf::Sleep(sf::Seconds(0.5f));
}
return 0;
}
and compiling with:
g++ -I/c/sfml/include -L/c/sfml/lib -lsfml-system test.cpp
I get the following error:
C:\Users\tommo\Desktop\ga>g++ -I/c/sfml/include -L/c/sfml/lib -lsfml-system test.cpp
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x16): undefined reference to `_imp___ZN2sf5ClockC1Ev'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x26): undefined reference to `_imp___ZNK2sf5Clock14GetElapsedTimeEv'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x3c): undefined reference to `_imp___ZNK2sf4Time9AsSecondsEv'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x73): undefined reference to `_imp___ZN2sf7SecondsEf'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x81): undefined reference to `_imp___ZN2sf5SleepENS_4TimeE'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0x8f): undefined reference to `_imp___ZNK2sf5Clock14GetElapsedTimeEv'
C:\Users\tommo\AppData\Local\Temp\cck7pgPY.o:test.cpp:(.text+0xa5): undefined reference to `_imp___ZNK2sf4Time9AsSecondsEv'
collect2: ld returned 1 exit status
Has anyone else had any luck compiling with mingw?