LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-22-2004, 07:25 PM   #1
xflow7
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 214

Rep: Reputation: 45
Help. Need a Library Primer


Hi folks,

I've been using Linux more or less exclusively for about 4 years. In that time I've developed what I feel is, on the whole, a pretty solid level of user (as opposed to developer) knowledge. I can compile my own kernels, install stuff, write scripts and all that happy stuff. However, I am thoroughly embarrased by how little I understand about the whole subject of libraries, archives, linking, etc. At a basic level I think I understand the prinicipal of what a shared library is and why it's a good thing, but beyond that I am kind of clueless about how it all fits together and what commands like ld, ldconfig, ar, etc do and when one needs to use them.

For example, today I installed dosemu. When I tried to run it, it complained that it couldn't find libXxf86vm.so.1. Now, for kicks I looked around and I've found that there is a file libXxf86vm.a in /usr/X11/lib, but as expected no libXxf86vm.so.anything. I gather the .a file is an "archive" file, but I don't really understand what that is. Is it related to the .so file I am apparently missing? Can I somehow create the .so file from what I have already on my machine? If not, how would I go about figuring out where I have to go to get the right lib file?

I've looked around here and elsewhere for some kind of a primer on the whole library subject, but without any luck.

So, can one of you kind souls either give me a nickel-and-dime tour of the subject, or point me to a good reference where I can get a handle on it all?

Thanks in advance,

Dave
 
Old 10-23-2004, 02:44 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
The .a is a reference to a.out, an older form of binary executable file which has been replaced by ELF format. A.out is maintained for backward compatibility. You don't say which distro you're using or how old (new?) it is. You may need to upgrade libXxf86 to get the ELF binaries. Or, try to find a statically-linked dosemu with ELF binaries included. Or, try an aout2elf conversion utility. Copy the libX....a file you have, convert to ELF, and give it the correct .so.1 extension and see it that works (I wouldn't bet money on it).
Google turns up loads of discussion on the topic of a.out and ELF.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
adding a bulit in library to my library lg3 Linux - Software 1 10-17-2004 08:19 AM
Primer on web browsers requested Franklin Linux - Software 1 08-11-2004 11:46 PM
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
DHCP Server Primer?? QuadMonk Linux - Networking 2 04-25-2002 03:48 AM

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

All times are GMT -5. The time now is 06:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration