*EDIT* oops, I accudently posted this in the wrong forum. Does anyone know how to remove or move this post to 'help general forum'? Thanks
I did everything right. I built SFML using Cmake with MSYS configuration. Then I copied exact code from the tutorial which looks like this,
#include <SFML/Window.hpp>
int mian(){
sf::Window window(sf::VideoMode(500, 400), "Window", sf::Style::None);
while(window.isOpen()){
sf::Event event;
while(window.pollEvent(event)){
if(event.type == sf::Event::Closed){
window.close();
}
}
}
return 0;
}
This is my compilation...
g++ -std=c++11 window.cpp -o window.exe -L. -lsfml-main -lsfml-window -lsfml-
system
It gives me this error...
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o):(.text.start
up+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
make: *** [all] Error 1
What's my problem?