undefined reference to symbol even when nm indicates that this symbol is present in the shared library 2
问题 I found same question here but the answer doesn't help me. I'm writing test app to use nglib library. But when I try to compile it I get undefined references: $ g++ test1.cpp -L. -lnglib test1.cpp: In function ‘int main()’: /tmp/cchcKZfx.o:test1.cpp:function main: error: undefined reference to 'Ng_Init()' /tmp/cchcKZfx.o:test1.cpp:function main: error: undefined reference to 'Ng_NewMesh()' ... /tmp/cchcKZfx.o:test1.cpp:function main: error: undefined reference to 'Ng_Exit()' collect2: ld