This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "AR" problem


On Mon, 2006-12-11 at 21:17 -0500, Igor Korot wrote:

> Now, in my app I have 2 statically linked .a library. One library (mylib1.a) depends on the other (mylib2.a). I was planning to link them together in one library using the KDevelop. However to my surprise, I found that the "ar" utility, that is used to generate the .a file/library does not work if the file is not located in the current directory. It is saying: "File not found".

It's up to you to decide what goes into each of your archive libraries.
If it makes sense to put all of the code into one library, then do that.
If not, keep them separate.  When it comes time to link your final
application, include -lmylib1 -lmylib2 and link both to the final
executable.  If there is a dependence between the two, you'll need to
determine the order that they're linked.

Cheers, Ben



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]