Thread: SFML - Static Linking

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2014
    Posts
    26

    SFML - Static Linking

    I followed the tutorial here (I am trying to statically link the SFML libraries so that my end-result exe will have the DLL's embedded in it):
    SFML and Visual studio (SFML / Learn / 2.3 Tutorials)

    (1) I have added the following in CONFIGURATION PROPERTIES>>C/C++>>GENERAL>>ADDITIONAL INCLUDE DIRECTORIES:
    C:\\Path to my SFML Include Directory

    (2) I have added the following in CONFIGURATION PROPERTIES>>LINKER>>GENERAL>>ADDITIONAL LIBRARY DIRECTORIES:
    C:\\Path to my SFML Lib Directory

    (3) I have added the following in CONFIGURATION PROPERTIES>>C/C++>>PREPROCESSOR DEFINITIONS:
    SFML_STATIC;

    (4) I then added the following in CONFIGURATION PROPERTIES>>LINKER>>INPUT>>ADDITIONAL DEPENDENCIES:
    sfml-window-s-d.lib; sfml-system-s-d.lib; sfml-graphics-s-d.lib; sfml-audio-s-d.lib; opengl32.lib; freetype.lib; jpeg.lib; winmm.lib; gdi32.lib; openal32.lib; flac.lib; vorbisenc.lib; vorbisfile.lib; vorbis.lib; ogg.lib; winmm.lib;

    I am comparing the size of the the exe (the statically linked) to the one I had previously (the dynamically linked), and there does seem to be a size difference. Why am I still receiving an error message when I try to run it without the DLL's in the same directory?

    Even if you are not familiar with SFML, then any help regarding statically linking a DLL in general that may help me would be greatly appreciated!
    Last edited by c_lover; 08-05-2015 at 05:48 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 11-06-2014, 08:36 AM
  2. static library linking
    By jcfuller in forum C Programming
    Replies: 4
    Last Post: 10-07-2014, 10:43 AM
  3. RPM Depencies and static linking
    By SomeNYCGuy in forum Linux Programming
    Replies: 2
    Last Post: 12-06-2009, 12:58 PM
  4. Linking errors with static var
    By Elysia in forum C++ Programming
    Replies: 8
    Last Post: 10-27-2007, 05:24 PM
  5. static linking with Dev-c++/gcc
    By silk.odyssey in forum C Programming
    Replies: 6
    Last Post: 12-14-2003, 01:28 PM

Tags for this Thread