gcc undefined reference between libraries-Collection of common programming errors
At linking time, I’m getting the following:
libMain.a(Object.o): In function `Object':
Object.cpp(44): undefined reference to `Transform::MakeIdentity()'
It is definitely seen from using nm --defined-only libSystem.a
Transform.o:
00000000 T Transform::MakeIdentity()
Both libSystem.a and libMain.a are being input appropriately. Linker command line options:
-o “Game.so” -shared -Wl,-z,noexecstack “-lstdc++” “-lsupc++” “-lgnustl_static” “-lgcc” “libSystem.a” “libMain.a” -nostdlib -l”c” -l”m” -l”log” -l”gcc” -Wl,-soname,”libGame” -Wl,–no-undefined
Originally posted 2013-11-09 22:39:34.