LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-29-2006, 04:05 AM   #1
bujecas
Member
 
Registered: Oct 2004
Location: Portugal
Distribution: Debian, Slackware
Posts: 78

Rep: Reputation: 20
how to build a linux library


Hello,

I have a linked list made in C and I want to include it in the Linux system libraries so that I can do something like "#include <linked_list.h>". I know that I have to put the .h in /usr/include but what about the .so lib? It's the same as the .o made by the Makefile? What I have to do?

Thanks.
 
Old 03-29-2006, 08:15 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Google is your friend.
The man pages too
Hope you know the difference between static and dynamic libraries...

Quote:
under linux,you can create both static and dynamic libraries.

use ar to create static library.see 'man ar',simple example:
ar cru libmylib.a listview.o
use gcc to create dynamic library.see 'man gcc',simple example:
gcc -shared -o libmylib.so.0.1 listview.o
 
Old 04-09-2006, 05:48 PM   #3
landonmkelsey
Member
 
Registered: Jul 2001
Location: Texas
Distribution: Fedora 16
Posts: 323

Rep: Reputation: 37
JUST WHAT I NEEDED! Thanks!

Your presentation is clear without the usual convoluted

expressions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Library build errors for Alsa sound driver jallingt Linux - Hardware 0 06-28-2005 12:03 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 09:18 PM
running applications from one Linux build in another Linux build bcottam Linux - Distributions 2 04-13-2004 12:08 AM
How can I use gcc to build a static library? vtluu Red Hat 1 04-12-2004 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration