This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello. I have a task to collect some libraries in big one. When I add that libraries to libraries list in Code Composer Studio 3.3, my executable project can not find definitions of functions using in big library (from content libraries). What can I do with this? Thanks.
So you have created a library using the archiver and included it in your CCS project under the "Include Libraries" (-l) option?
What does the Debug.lkf file in your project folder look like?
One way to confirm that the symbols that the linker is unable to resolve are indeed present in the library file could be by running ofd (object file display) utility on the library file. The ofd is a utility included with the codegen tools that dumps detailed information about COFF object files and libraries. You can find details on this utility and command line options in the Assembly Language Tools Users Guide for the processor family you are using.
Hello, Aarti. Tnanks for the answer.
Yes I include library with -l option in my executable. I send you file with Debug.lkf of my lib, my executable and the ofd dump of my lib.
Michael,
So you are first trying to create a archive of library files and object files into one library, and then linking that one combined library into your executable project? I don't think this is possible, but if anyone else knows if this can be done, maybe they can add their comments.
Looking at the ofd output of the library file only the symbols from the .obj files are being reported. So it appears that library files cannot be combined in this way.
One option might be to extract the sources for the NDK libraries (using archiver option to extract) and archive all the sources together into 1 combined library.
Aarti said:One option might be to extract the sources for the NDK libraries (using archiver option to extract) and archive all the sources together into 1 combined library.
I have thought about it. But it is undesirable solution. Thanks for the help.
The TI archiver does not support a hierarchy of libraries. If you want to combine multiple libraries, extract all the contents of each individual library into an empty directory, and then make one big flat archive of that directory contents.
Thanks and regards,
-George
An object library is just a plain archive which happens to contain object files, with a symbol table thrown in so the linker can find functions and variables. You can unpack the object files from the archive and repack whatever object files you like back into the archive. So, you can unpack the contents of both libraries into a directory, then re-pack everything together into one combined library. You can't just place one archive inside another and link against it; only singly-nested object files are considered when linking. See the documentation for the archiver in the assembly language tools user's guide. Generally combining libraries like this is unnecessary, as you can just link against both libraries at link time.
Well I hate to disagree (but I will anyway). When dealing with a large number of libraries it is very desirable (and has been common practice) to build libraries into other libraries for ease of use, ease of sharing, and general maintenance. This shortcoming of archiver almost single handedly makes it useless for larger projects. It is one thing to say "link against both" when you are making one library and have one more, but when you are talking about TENS of libraries this can become amazingly painful.
I am not sure why it would be so hard for the archiver to essentially unpack and repack included libraries and symbols. It is a very common task for a lot of development environments.