Thread: static linking and dll inclusion

  1. #1
    Registered User
    Join Date
    Feb 2020
    Posts
    6

    static linking and dll inclusion

    Here :
    windows - mingw-w64 threads: posix vs win32 - Stack Overflow

    Someone says "You can always link gcc runtime and winpthreads statically, removing necessity of DLL inclusion.".

    I don't understand.
    Why linking statically would prevent DLL inclusion ?

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Static linking one library would not prevent other DLL being included. But the static linking removes the need for that particular DLL.

    Do you understand that a statically linked library can replace a dynamically linked library?

  3. #3
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    338
    It is similar to including the dll within the executable instead of outside.

  4. #4
    Registered User
    Join Date
    Feb 2020
    Posts
    6
    Ok, statically linking a library means no DLL (dynamic link library) for that library.
    I think I got it.

  5. #5
    Registered User
    Join Date
    Feb 2020
    Posts
    6
    What are great resources (videos, books) to learn about C compiling and linking ? I follow C courses, but they don't really talk about that. Thanks for helping !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. static library linking
    By jcfuller in forum C Programming
    Replies: 4
    Last Post: 10-07-2014, 10:43 AM
  2. Linking C++ Static Libs
    By phylene in forum C++ Programming
    Replies: 15
    Last Post: 03-19-2012, 08:08 PM
  3. Linking errors with static var
    By Elysia in forum C++ Programming
    Replies: 8
    Last Post: 10-27-2007, 05:24 PM
  4. static linking with Dev-c++/gcc
    By silk.odyssey in forum C Programming
    Replies: 6
    Last Post: 12-14-2003, 01:28 PM
  5. Static Linking/Borland
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 01-16-2002, 03:17 PM

Tags for this Thread