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

Author Topic: Error with linker (new to SFML)  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

Detilium

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error with linker (new to SFML)
« on: June 13, 2016, 10:35:56 pm »
Hello forums!

First post, first project, and actually first C++ project!
Of course all of this is cool, but as I'm completely green, errors and rookie mistakes will occur.

Already from the beginning I'm having problems.

I downloaded the version of SFML that I need to use, and set everything up to use the framework.

  • I created a new Win32 console application (completely fresh and bare)
  • I created the main.cpp file
  • I added all references (images below)

Linker general (debug+release)


Linker dependencies (debug)


And release


C/C++ General (debug+release)


As you can see, I've done all the necessary things to make this work. I copied the DLL's into the correct folder as well (where my .exe would be), but my .exe is not there as I have not yet build the solution. Is that the issue? or have I made some other strange mistake somewhere?

I'm really quite lost on what's missing. I tried the static way as well, but no difference.

Here's the linker error I'm getting:

Quote
   LNK1104   cannot open file 'sfml-graphics-d.lib sfml-window-d.lib sfml-system-d.lib kernel32.lib'

ratzlaff

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Error with linker (new to SFML)
« Reply #1 on: June 13, 2016, 11:16:24 pm »
Your 'Additional Dependencies' under Linker->Input need semicolons instead of spaces between each lib file.

Detilium

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error with linker (new to SFML)
« Reply #2 on: June 14, 2016, 04:25:43 pm »
Your 'Additional Dependencies' under Linker->Input need semicolons instead of spaces between each lib file.
Yup that was it. Appreciate your help!

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Error with linker (new to SFML)
« Reply #3 on: June 14, 2016, 09:56:22 pm »
The tutorial does should them separated with spaces. Does this work for some versions? Obviously, it doesn't work for all versions though so maybe it should be changed in the tutorial to semi-colons; that's the standard list separator in Windows, isn't it?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

ratzlaff

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Error with linker (new to SFML)
« Reply #4 on: June 14, 2016, 10:39:45 pm »
so, I admit I have never read the tutorial, mostly because I am not its target audience.

In order to fix the tutorial, you should show the editor window that pops up when you click the 'down' arrow at the right-hand side of the line, and choose 'edit'. After entering the dependencies (one per line), it will format them appropriately.

Is the format different for different versions of visual studio? I cannot say with certainty. I do however know that the 'Additional Dependencies' editor has not had any significant changes since VS2008.