SFML with Visual C++

I have never used Visual C++ much but I am trying to get SFML to work with it.

I copy/pasted the include folder and lib files.
I tried running the initial code in the SMFL tutorial on the website but there is a DLL problem. When I would try to run the program, the exe comes up wityh an error stating "sfml-system.dll is not on your computer."

If I place the dll in the same directory it works, but it is a pain to have to include that anytime I want to compile a SFML project. I am 99% sure everything is in the correct folders, and I even linked the project to separate folders on my Desktop where all of the SFML files are.

What can I do to prevent this?

Here is the code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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;
}
Last edited on
You have to put the DLLs in a directory where the PATH environment variable points to or the to same directory where the executable is.
Alright I guess I'll just place it in the same directory.
Topic archived. No new replies allowed.