SFML community forums

Help => General => Topic started by: Detilium on June 13, 2016, 10:35:56 pm

Title: Error with linker (new to SFML)
Post by: Detilium 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.


Linker general (debug+release)
(http://i.imgur.com/UndySDv.jpg)

Linker dependencies (debug)
(http://i.imgur.com/qYCC36W.jpg)

And release
(http://i.imgur.com/alLGtYg.jpg)

C/C++ General (debug+release)
(http://i.imgur.com/hdj7cLd.jpg)

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'
Title: Re: Error with linker (new to SFML)
Post by: ratzlaff on June 13, 2016, 11:16:24 pm
Your 'Additional Dependencies' under Linker->Input need semicolons instead of spaces between each lib file.
Title: Re: Error with linker (new to SFML)
Post by: Detilium 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!
Title: Re: Error with linker (new to SFML)
Post by: Hapax on June 14, 2016, 09:56:22 pm
The tutorial (http://www.sfml-dev.org/tutorials/2.3/start-vc.php#creating-and-configuring-a-sfml-project) 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?
Title: Re: Error with linker (new to SFML)
Post by: ratzlaff 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.