So i've reinstalled MingW
on windows Source: main.cpp
#include <SFML/Window.hpp>
int main()
{
sf::Window window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
}
return 0;
}
Ran: g++ -c main.cpp -Ic:\SFML-2.0\include -> main.o file was created.
Now when I go to do: g++ main.o -o sfml-app -Lc:\SFML-2.0\lib -lsfml-window -lsfml-system
I get a weird error:
C:\Users\Lamonte\Documents\Project\C++>g++ main.o -o sfml-app -Lc:\SFML-2.0\lib
-lsfml-window -lsfml-system
main.o:main.cpp:(.text+0xd1): undefined reference to `_imp___ZN2sf6StringC1EPKcR
KSt6locale'
main.o:main.cpp:(.text+0xf7): undefined reference to `_imp___ZN2sf9VideoModeC1Ej
jj'
main.o:main.cpp:(.text+0x132): undefined reference to `_imp___ZN2sf6WindowC1ENS_
9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
main.o:main.cpp:(.text+0x162): undefined reference to `_imp___ZN2sf6Window5close
Ev'
main.o:main.cpp:(.text+0x178): undefined reference to `_imp___ZN2sf6Window9pollE
ventERNS_5EventE'
main.o:main.cpp:(.text+0x18a): undefined reference to `_imp___ZNK2sf6Window6isOp
enEv'
main.o:main.cpp:(.text+0x1a1): undefined reference to `_imp___ZN2sf6WindowD1Ev'
main.o:main.cpp:(.text+0x1cf): undefined reference to `_imp___ZN2sf6WindowD1Ev'
main.o:main.cpp:(.text+0x1f9): undefined reference to `_imp___ZN2sf6WindowD1Ev'
collect2: ld returned 1 exit status