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

Author Topic: Need help installing SFML, Nothing works - Visual Studio 2012.  (Read 1535 times)

0 Members and 1 Guest are viewing this topic.

ChickenFeet

  • Newbie
  • *
  • Posts: 1
    • View Profile
Before I start I'd like to say for the last 2 hours I have read numerous threads, gone through the official SFML installation guide 4 times and tried a lot of different things before posting this.

I have decided to go through the installation following each step exactly. I'll list the steps here:
  • Copied SFML-1.6\include\SFML folder to VC\include
  • Copied all the files inside SFML-1.6\lib to VC\lib
  • Open Visual Studio 2012 -> New Project -> Win32 Project -> Finish
  • Add -> New Item -> called it Main.cpp to the Source Files
  • Copy le pasta the code from the guide (sf::Clock class example) to Main.cpp
  • Added #include "stdafx.h" to the top because it was failing to compile
This results in the error:
Quote
Error   1   error LNK1104: cannot open file 'sfml-system-d.lib'   F:\Cert IV IT (General)\C++\test\Win32Project1\Win32Project1\LINK   Win32Project1

I've checked the location there is a file named:
sfml-system-d.dll
Inside the folder, if I rename it to 'sfml-system-d.lib' I get the error:
Quote
Error   1   error LNK1107: invalid or corrupt file: cannot read at 0x420   C:\Program Files\Microsoft Visual Studio 11.0\VC\lib\sfml-system-d.lib   1   1   Win32Project1

I'm pretty sure I don't have to rename the file for it to work but I tried just in case and it also proves the linker is looking in the right place just the file isn't working or something along those lines.

Also not sure if related or not but I was originally following this tutorial:
http://www.dreamincode.net/forums/topic/230524-c-tile-engine-from-scratch-part-1/
The tutorial stated to include 'sfml-main-d.lib' but this file doesn't exist in the zip file I downloaded, nor do any other main.lib or main.dll files of any sort.

Running Windows 7 SP1
Using SFML-1.6-sdk-windows-mingw

Can someone please shed some light onto this problem?


Christopher Jozwiak

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • Blog
    • Email
Re: Need help installing SFML, Nothing works - Visual Studio 2012.
« Reply #1 on: March 21, 2013, 07:52:36 am »
SFML 1.6 is 2 years old.  Unless you build it from source it's not going you will not be able to use it with vs 2012.  I suggest you use 2.0 it is stable and is about to be released as current.  Also use the search function.  There's multiple references too this kind of question, well everywhere.  Also why are you using MinGW?  VS 2012 uses a different compiler.
« Last Edit: March 21, 2013, 07:54:11 am by Sianide »
Noob C++ Programmer.