SFML community forums
General => General discussions => Topic started by: adikid89 on September 25, 2010, 04:54:27 pm
-
I'm getting this error when trying to compile the code below:
error LNK2001: unresolved external symbol _WinMain@16
#include <iostream>
#include <SFML/System.hpp>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}
The project is on Release, and the additional dependencies are: sfml-system.lib
-
There are three possible solutions to this problem:
1) Link with sfml-main.lib.
2) Build the project as a console application instead of a windows application.
3) Rename main() to WinMain().