在链接时,我得到以下信息:
libMain.a(Object.o): In function `Object':
Object.cpp(44): undefined reference to `Transform::MakeIdentity()'
从使用中肯定可以看出nm --defined-only libSystem.a
Transform.o:
00000000 T Transform::MakeIdentity()
libSystem.a 和 libMain.a 都被正确输入。链接器命令行选项:
-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