I've had some errors thrown up by some of my own static libs during linking. At first, I thought it was something screwy with my use of rtti and templates, but it appears that my own static libs have problems linking to the sdk static libs.
Does anybody have any idea as to why this would be?
Problems with linking to own static libs
-
- Posts: 23
- Joined: Sat Nov 25, 2006 5:53 am
I've resolved most of the link issues by munging all of the cpp files used to generate the libs into the exe. I guess the majority of those were due to link order (the one thig I hate about gcc based tool-chains).
But the problem remains that I'm getting a link error with the vtables of a few classes, which use some templates to wrap around a custom rtti system.
So yet again, any ideas anybody?
But the problem remains that I'm getting a link error with the vtables of a few classes, which use some templates to wrap around a custom rtti system.
So yet again, any ideas anybody?
-
- Posts: 23
- Joined: Sat Nov 25, 2006 5:53 am
Hah. I almost had a snipy reply, but youre perfectly correct.
The link errors that I'm getting are
I've done as you've ordered, I mean, suggested and done a quick look on the link order issue which I guess makes perfect sense now that I think about it. I may just try and tell the linker to link in everything and rely on psp-strip to remove anything that isn't used.
All I have to do after that is figure out get rid of the rtti related link errors. I have a feeling that it might be because I'm not linking in the C++ std lib though.
The link errors that I'm getting are
Code: Select all
../../../Magma/obj/psp/release/Core/MgObject.o:(.rodata._ZTIN6MgCore6IClassINS_7CObjectENS_11CNullObjectEEE[typeinfo for MgCore::IClass<MgCore::CObject, MgCore::CNullObject>]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
../../../Magma/obj/psp/release/Core/MgObject.o:(.rodata._ZTIN6MgCore11CNullObjectE[typeinfo for MgCore::CNullObject]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
../../../Magma/obj/psp/release/Render/MgCamera.o:(.rodata._ZTIN8MgRender7CCameraE[typeinfo for MgRender::CCamera]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
../../../Magma/obj/psp/release/Render/MgCamera.o:(.rodata._ZTIN6MgCore6IClassIN8MgRender7CCameraENS_7CObjectEEE[typeinfo for MgCore::IClass<MgRender::CCamera, MgCore::CObject>]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
../../../Magma/obj/psp/release/Render/psp/MgRenderManagerPsp.o:(.rodata._ZTIN8MgRender17CRenderManagerPspE[typeinfo for MgRender::CRenderManagerPsp]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
All I have to do after that is figure out get rid of the rtti related link errors. I have a feeling that it might be because I'm not linking in the C++ std lib though.