Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Unable to get SFML working  (Read 892 times)

0 Members and 1 Guest are viewing this topic.

tyriuth

  • Newbie
  • *
  • Posts: 2
    • View Profile
Unable to get SFML working
« on: April 03, 2014, 11:47:16 am »
I understand that you all probably get quite a few topics posted about this, and before you ask; yes I have looked through the forum, and the rest of the internet before writing this.

I'm using Visual Studio Express 2010 and I have the following code:
#include <SFML/System.hpp>

int main()
{
    sf::sleep(sf::seconds(1.f));
    return 0;
}

I have placed the SFML folder with the include files in the Visual Studio 10.0\VC\include folder, and all the libraries have been placed in the \lib folder. With that in mind I shouldn't need to specify any additional Include Directories or Library Directories.

Under the Linker->Input section of the project properties I have added in the additional dependencies I require (sfml-system-2.dll and sfml-system-d-2.dll)

The sfml-system-2.dll and sfml-system-d-2.dll

And I keep getting the error:
1>LINK : fatal error LNK1104: cannot open file 'sfml-system-2.dll'

Any suggestions?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Unable to get SFML working
« Reply #1 on: April 03, 2014, 12:00:49 pm »
Quote
Under the Linker->Input section of the project properties I have added in the additional dependencies I require (sfml-system-2.dll and sfml-system-d-2.dll)
You must link the .lib files, not the DLLs.

Quote
I understand that you all probably get quite a few topics posted about this, and before you ask; yes I have looked through the forum, and the rest of the internet before writing this.
This was clearly shown in the "getting started" tutorial, with screenshots.
Laurent Gomila - SFML developer

tyriuth

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Unable to get SFML working
« Reply #2 on: April 03, 2014, 12:38:19 pm »
Changing that still gives essentially the same error:
1>LINK : fatal error LNK1104: cannot open file 'sfml-system-2.lib'

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Unable to get SFML working
« Reply #3 on: April 03, 2014, 12:48:57 pm »
Please read the tutorial and make sure the linker path is correct and the SFML libraries are actually there.

And don't put SFML in the Visual Studio folder, that's not the way to install libraries. Use a separate path and specify it in VS.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Unable to get SFML working
« Reply #4 on: April 03, 2014, 03:46:26 pm »
There's no "-2" in .lib file names...
Laurent Gomila - SFML developer

 

anything