SFML community forums

Help => General => Topic started by: kurtis on November 15, 2014, 03:45:39 am

Title: building static libraries for vs 2013
Post by: kurtis on November 15, 2014, 03:45:39 am
hi I'm trying to build sfml 2.1 for vs 2013 and have the dynamic libraries working but when I try and build the static I get errors in visual studio and it won't build

errors:
Error   1   error LNK1104: cannot open file '"C:/SFML-2.1/extlibs/libs-msvc/x86/openal32.lib"'   C:\sfml-build\src\SFML\Audio\LINK   sfml-audio
Error   2   error LNK1181: cannot open input file '"opengl32.lib"'   C:\sfml-build\src\SFML\Window\LINK   sfml-window
Error   3   error LNK1181: cannot open input file '"ws2_32.lib"'   C:\sfml-build\src\SFML\Network\LINK   sfml-network
Error   4   error LNK1104: cannot open file '"C:/SFML-2.1/extlibs/libs-msvc/x86/freetype.lib"'   C:\sfml-build\src\SFML\Graphics\LINK   sfml-graphics
Title: Re: building static libraries for vs 2013
Post by: Gambit on November 15, 2014, 05:38:25 am
You need to link the external dependencies yourself when you build statically.
Title: AW: building static libraries for vs 2013
Post by: eXpl0it3r on November 15, 2014, 08:13:27 am
https://github.com/SFML/SFML/wiki/FAQ#wiki-build-link-static
Title: Re: building static libraries for vs 2013
Post by: kurtis on November 15, 2014, 07:37:11 pm
I'm still a little lost on how to link the dependencies, I'm new to programming and cant find where I link them myself
Title: Re: building static libraries for vs 2013
Post by: Hapax on November 16, 2014, 02:00:25 am
Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies.

You can add...

for Debug:
sfml-graphics-s-d.lib;freetype.lib;glew.lib;jpeg.lib;opengl32.lib;sfml-network-s-d.lib;sw2_32.lib;sfml-window-s-d.lib;ws2_32.lib;sfml-audio-s-d.lib;openal32.lib;sndfile.lib;sfml-system-s-d.lib;winmm.lib;

for Release:
sfml-graphics-s.lib;freetype.lib;glew.lib;jpeg.lib;opengl32.lib;sfml-network-s.lib;sw2_32.lib;sfml-window-s.lib;ws2_32.lib;sfml-audio-s.lib;openal32.lib;sndfile.lib;sfml-system-s.lib;winmm.lib;

This will link all SFML modules (System, Windows, Graphics, Audio, and Network)

The only reason I supplied such a spoon-fed answer is because I already had these lists and just copied and pasted them  ;D
Title: Re: building static libraries for vs 2013
Post by: Gambit on November 16, 2014, 05:22:13 am
It is all explained here: http://sfml-dev.org/tutorials/2.1/start-vc.php