Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unix Make ar and ld

Posted on 2003-12-11
4
Medium Priority
?
461 Views
Last Modified: 2013-12-26
What do ar and ld exactly do in making a library? Are these diiferent programs for the same purpose or are they used in tandem for file archiving. Can anybody point me to some links. I heard that the order of the libraries matters in ar and does not in ld. can somebody elaborate.

Thanks,
--P
0
Comment
Question by:supavan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
HamdyHassan earned 100 total points
ID: 9923940

do the following
$ man ar
$ man ld

check "Creating Unix Libraries" at
http://www.cs.duke.edu/~ola/courses/programming/libraries.html

From this article, you could see "ar" is used for "Static Libraries" and "ld" is used for "Dynamic libraries"


0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 100 total points
ID: 9930977
.. completing HamdyHassan comment:
ar - maintain portable archive or library
simply maintains a group of (.o) files in an archive.
When building executable from object files or archives, the order is important.

ld - link-editor for object files
is either used to build (dynamic) hared objects, which either is a (dynamic) shared library, or an executable.
For these objects the oder is not important as long as there are no cyclic references and no other static objects.
For details see corresponding man pages
0
 
LVL 18

Expert Comment

by:liddler
ID: 10241422
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Points split HamdyHassan & ahoffmann

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question