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

Author Topic: building static libraries for vs 2013  (Read 3782 times)

0 Members and 1 Guest are viewing this topic.

kurtis

  • Newbie
  • *
  • Posts: 4
    • View Profile
building static libraries for vs 2013
« 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

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Re: building static libraries for vs 2013
« Reply #1 on: November 15, 2014, 05:38:25 am »
You need to link the external dependencies yourself when you build statically.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kurtis

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: building static libraries for vs 2013
« Reply #3 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

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: building static libraries for vs 2013
« Reply #4 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
« Last Edit: November 16, 2014, 02:02:07 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Re: building static libraries for vs 2013
« Reply #5 on: November 16, 2014, 05:22:13 am »

 

anything