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]

"AR" problem


Hi, ALL,
My name is Igor Korot and recently I found some problem that I couldn't understand/re-solve.

I have a Gentoo Linux installed along with the KDevelop to develop my application. I also have the wxWidgets library, as my app will be cross platform.

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".

To understand this situation further I asked on the KDevelop forum, and, to my surprise found out, that I cannot link 2 .a libraries together. It is pointless.
However I can do that on Windows using Visual Studio. Also if one library depend on second it should be linked together, otherwise the code will just  crash.

Could someone please clarify to things:
1. Is it possible under Linux to link 2 .a libraries in one .a library? Does it makes sence? Or is it not and it means that the program has a bad design?

The design is as follows:

mylib1.a exports class1. mylib2.a exports class2. Now class2 uses the functions from class1, and they are not inline.

2. Is there a possibility to support working with different directories for the "ar" utility?

Thank you in advance and sorry for such a long posting.



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