C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-10-2005, 02:34 AM   #1
Registered User
 
Join Date: Aug 2005
Posts: 1
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?

Thanks
IconTree
IconTree is offline   Reply With Quote
Old 08-10-2005, 01:51 PM   #2
.
 
Join Date: Nov 2003
Posts: 293
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:
Code:
gcc mycode.c -o mycode  mylib.a  /usr/lib/libc.a
jim mcnamara is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 04:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22