I have to make the SFML headers and library files available to Visual C++ 2008 and after bulid:
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}
It gives me the following errors:
1>------ Build started: Project: sf_test, Configuration: Release Win32 ------
1>Linking...
1>testx.obj : error LNK2001: unresolved external symbol "void __cdecl sf::Sleep(float)" (?Sleep@sf@@YAXM@Z)
1>testx.obj : error LNK2001: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ)
1>testx.obj : error LNK2001: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)
1>C:\Users\Szymon\Documents\Visual Studio 2008\Projects\sf_test\Release\sf_test.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\Szymon\Documents\Visual Studio 2008\Projects\sf_test\sf_test\Release\BuildLog.htm"
1>sf_test - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can someone help me how to solve this problem?