"AR" problem
Ben Elliston
bje@au1.ibm.com
Tue Dec 12 02:44:00 GMT 2006
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
More information about the Binutils
mailing list