Thread: Dynamic Libraries and definition files

  1. #1
    Registered User
    Join Date
    Aug 2005

    Dynamic Libraries and definition files

    When programming on Windows, and working with dll's, I always include the corresponding .lib file so that I do not have to deal with actually dynamically loading the library, jut still have the ability to change the dll.

    Is there something similar possible in Linux when working with .so files? I understand there is a .la file, but I am unsure of where this fits in with the whole process.

    Or, am i going to have to dynamically load all my libraries on Linux?


  2. #2
    Join Date
    Nov 2003
    In terms of system impact, it's usually better to use shared libraries - they use less memory.
    You can link them statically -
    assume you created mylib.a with lots of object modules, plus you want to link C runtime statically as well. Simple example:
    gcc mycode.c -o mycode  mylib.a  /usr/lib/libc.a

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  2. Why initialization of static member is a must?
    By meili100 in forum C++ Programming
    Replies: 9
    Last Post: 04-11-2008, 05:22 PM
  3. Headers, Libraries and the rest
    By nickname_changed in forum C++ Programming
    Replies: 8
    Last Post: 06-23-2003, 08:17 PM
  4. Compile with *.lib
    By Kelvin in forum C++ Programming
    Replies: 1
    Last Post: 07-23-2002, 06:24 PM
  5. error LNK2001: unresolved external symbol
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 07-12-2002, 08:45 PM