Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-19-2006, 08:48 PM
|
#1
|
LQ Newbie
Registered: Sep 2005
Posts: 3
Rep:
|
Convert static library (Filename.a) to dynamic shared object (filename.so)
I have this problem where an application (Xgl) complains it can't find two librairies, libXau.so and libXdmcp.so. I don't have these X related files on my system, but have the static libXau.a and libXdmcp.a files in my /usr/X11/lib directory. I already a similiar problem, but using a rarer library (where I couldn't find the .so files on the net), so I simply ran a few (cryptic?!?!) commands to generate .so file(s) from the library archive. anyone know where I can get information on this? Also, anybody know if the .a file is a collection of .o files, or if .a files are the same as .o files, and are only in a different format, using for static linking with an application?
Thanks in advance!
|
|
|
07-19-2006, 10:43 PM
|
#2
|
Senior Member
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834
Rep:
|
|
|
|
07-20-2006, 08:53 AM
|
#3
|
LQ Newbie
Registered: Sep 2005
Posts: 3
Original Poster
Rep:
|
Thanks for the reply....I'll try getting it to work by downloading the actual files. I was hoping someone would know how to do what I was talking about, but I guess I might as well get down to what I am really trying to do (install XGL and Compiz), I'll probably run across many other problems along the way.
Thanks a lot!
|
|
|
03-05-2007, 12:23 AM
|
#4
|
LQ Newbie
Registered: Jan 2006
Posts: 2
Rep:
|
Here's where I started:
http://tldp.org/HOWTO/Program-Librar...libraries.html
..here's another site which gave more color to the subject:
homes.esat.kuleuven.be/~gcc/shared_libraries.html
-to answer one of your questions directly: a .a file is a collection of .o files in archive file format. this archived collection of .o files is used for static linking with applications. So no, .o files aren't the same as .a files.
Quote:
Originally Posted by afx2029
I have this problem where an application (Xgl) complains it can't find two librairies, libXau.so and libXdmcp.so. I don't have these X related files on my system, but have the static libXau.a and libXdmcp.a files in my /usr/X11/lib directory. I already a similiar problem, but using a rarer library (where I couldn't find the .so files on the net), so I simply ran a few (cryptic?!?!) commands to generate .so file(s) from the library archive. anyone know where I can get information on this? Also, anybody know if the .a file is a collection of .o files, or if .a files are the same as .o files, and are only in a different format, using for static linking with an application?
Thanks in advance!
|
|
|
|
08-17-2007, 07:07 AM
|
#5
|
Member
Registered: Apr 2005
Location: Massachusetts, USA
Distribution: debian,ubuntu,slackware
Posts: 110
Rep:
|
I'd never run into this until today, when spice3 needed libtermcap
So I downloaded, built, and installed termcap, only to discover that it only installed the static libs, libtermcap.a
Fortunately after reading this post, I remembered something... static libs are ar archives. So here's what I tried (and it worked first time):
Code:
ar -x libtermcap.a
gcc -shared *.o -o libtermcap.so.2
Then copied the new file to /usr/lib and voila
|
|
|
All times are GMT -5. The time now is 12:22 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|