1

I tried this simple test to see if it would work:

#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;

}

And I get the following errors:

Error   1   error LNK2019: unresolved external symbol "void __cdecl sf::Sleep(float)" (?Sleep@sf@@YAXM@Z) referenced in function _main  c:\Users\Owner\documents\visual studio 2010\Projects\Engine\Engine\main.obj Engine
Error   2   error LNK2019: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ) referenced in function _main  c:\Users\Owner\documents\visual studio 2010\Projects\Engine\Engine\main.obj Engine
Error   3   error LNK2019: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ) referenced in function _main    c:\Users\Owner\documents\visual studio 2010\Projects\Engine\Engine\main.obj Engine
Error   4   error LNK1120: 3 unresolved externals   c:\users\owner\documents\visual studio 2010\Projects\Engine\Debug\Engine.exe    1   1   Engine

There is an instruction thread for installing SFML in VS 2010 here, and I followed that. Unfortunately, I still seem to have issues.

Is there anything specific I could be doing wrong?

2 Answers 2

1

Here's a tutorial for version 1.6, with screenshots:
> http://www.sfml-dev.org/tutorials/1.6/start-vc.php

Very important, if you link against the DLLs, you must add SFML_DYNAMIC in your project's settings (this is also mentioned in that tutorial I linked).

Sign up to request clarification or add additional context in comments.

Comments

1

If you run into "The program can't start because sfml-system.dll is missing from your computer," copy all the DLL files in your include directory and paste them in C:\Windows\system. Rebuild your project and everything should be fine now.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.