Current I'm building a shared object library using the following command
gcc -I ../include ../../ModuleBDef/include -I ../../ModuleB/include -I ../../ModuleADef/include --shared -fPIC moduleA.c plat_linux.c -o moduleAlib.so
I have moduleBlib.so
that contains a symbol that are required by moduleAlib.so
. When I use nm
to look at the symbols in ModuleAlib.so
I can see a U
beside that symbol.
I tried adding -L
command but the symbol is still undefined.
gcc -I ../include ../../ModuleBDef/include -I ../../ModuleB/include -I ../../ModuleADef/include -L../../ModuleB/src --shared -fPIC moduleA.c plat_linux.c -o moduleAlib.so
How do I resolve this undefined symbol?