Calling functions from libraries within libraries

HvW hermanv@process-auto.com
Thu Feb 16 12:56:00 GMT 2012


Hi,

I have a library called Lib_Crc to compute the CRC of certain memory areas.
This is used by another library called Lib_Appcfg which performs certain
configuration checking and verification.

My application "Test" needs to use both Lib_Crc functions and Lib_Appcfg
function in order to perform its tasks.

Why do I need to link both Lib_Crc and Lib_Appcfg in my application to use
the Lib_Crc functions? Won't the symbols be available to the application
form the Lib_AppCfg library?

I have tried several linking options including -shared and -export-dynamic
in multiple orders and arrangements, but in all cases when linking is done
on the application, it complains that the Lib_Appcfg says that the Lib_Crc
functions are "undefined references". To fix this I include Lib_Crc in my
app.

Any comments, suggestions or explanations will be appreciated.

Thanks,

H
-- 
View this message in context: http://old.nabble.com/Calling-functions-from-libraries-within-libraries-tp33335738p33335738.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list