SFML community forums

Help => General => Topic started by: Christian on May 13, 2010, 11:41:04 pm

Title: Need Help Setting Up Libraries
Post by: Christian on May 13, 2010, 11:41:04 pm
Hi, I'm new here.  I recently tried to set up SFML in Microsoft Visual C++, but I can't get it to work.  Whenever I build this:

Code: [Select]

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


I get this:

Code: [Select]

LINK : fatal error LNK1104: cannot open file 'sfml-system.lib'


I've looked all over for a solution, but nothing has worked.  Can anyone help me?
Title: Need Help Setting Up Libraries
Post by: nulloid on May 14, 2010, 12:51:34 am
Did you check that there is actually an existing file at the specified directory called "sfml-system.lib"?
Title: Need Help Setting Up Libraries
Post by: Christian on May 14, 2010, 01:01:33 am
Quote from: "nulloid"
Did you check that there is actually an existing file at the specified directory called "sfml-system.lib"?


No, there is a .dll file, and a similar topic on another forum had me under the impression that the .dll file would generate the .lib file.

EDIT: Apparently, I downloaded the wrong files.  After I got the right ones and put them in their respective folders, I got it to compile, but now when I run it, it tells me it can't find the .dll file.