Is it possible to add a shared library to a static library ?
I have created a new shared library "libshared.so" . There is a existing static library "libstatic.a" . I need to refer the new code of .so into the .a files.
The libstatic.a compiles fine after I add -I<path_of_the_files_shared.so> in its Makefile.
Now this static.a is referenced in a exe . To avoid any linker issues I added -L<path_of_shared.so> -lshared in the Makefile of the exe . But when I try to compile it I get linker issue , of undefined reference to the libstatic.a for the methods of .so .
Even the nm for libstatic.a gives "U" for the methods of .so
Now my question is :
1) Is it valid to have a shared library call in a static library?
2) How to get rid of this undefined reference error ?
Please help me solve this issue.
Last edited by rupa_123; 03-23-2012 at 02:14 AM.