I'm flummoxed by some linker errors I'm getting with g++/ld on Mandrake 9.1. I would understand why I was getting lots of undefined references while linking, but I'm only getting a few and that's mainly what's confusing me. Any suggestions greatly appreciated. I've searched Google and found many hits but none give an explanation as to what's going on or possible solutions.
Thanks
(P.S. Sorry for the extra wide screen, but I don't know how to post long lines without screwing the size up.)
I'm using ld version:
GNU ld version 2.13.90.0.18 20030121
and g++ version:
Reading specs from /usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
Code:
make -f testSDL.mk
Building the testSDL application.
g++ -o testSDL hbFPSTimer.o hbSDLApplication.o hbSDLFrameTimer.o hbSDLMaterial.o hbSDLMaterialManagerImpl.o hbSDLWindowImpl.o testSDL.o -L../lib/linux -lHabitatCoreEngine -lHabitatAudioEngine -lHabitatInputEngine -lHabitatRenderEngine -lHabitatGameEngine -lSDL -lSDL_image -L/home/mike/Development/lua/lib -llua -llualib -L/home/mike/Development/tolua/lib -ltolua -lGL -lGLU -L/usr/X11R6/lib -L/opt/fmod/api -lfmod-3.62
/home/mike/Development/lua/lib/liblualib.a(liolib.o)(.text+0xd69): In function `io_tmpname':
: the use of `tmpnam' is dangerous, better use `mkstemp'
../lib/linux/libHabitatGameEngine.a(hbSceneManager.o)(.text+0xcec): In function `Habitat::Game::hbSceneManager::CreateEntity(char const*, char const*)':
: undefined reference to `Habitat::Core::hbFileException::~hbFileException [in-charge]()'
../lib/linux/libHabitatGameEngine.a(hbSceneManager.o)(.text+0xd12): In function `Habitat::Game::hbSceneManager::CreateEntity(char const*, char const*)':
: undefined reference to `Habitat::Core::hbFileException::~hbFileException [in-charge]()'
../lib/linux/libHabitatGameEngine.a(hbSceneManager.o)(.gcc_except_table+0xdc): undefined reference to `typeinfo for Habitat::Core::hbFileException'
../lib/linux/libHabitatGameEngine.a(hbSceneManager.o)(.gnu.linkonce.t._ZN7Habitat4Core15hbFileExceptionC1ERKS1_+0x1d): In function `Habitat::Core::hbFileException::hbFileException[in-charge](Habitat::Core::hbFileException const&)':
: undefined reference to `vtable for Habitat::Core::hbFileException'
../lib/linux/libHabitatGameEngine.a(hbCamera_lua.o)(.gnu.linkonce.t._ZN7Habitat4Game8hbCamera11SetViewportEiiii+0x3a): In function `Habitat::Game::hbCamera::SetViewport(int, int, int, int)':
: undefined reference to `Habitat::Render::hbBaseViewport::hbBaseViewport[in-charge](int, int, int, int)'
../lib/linux/libHabitatGameEngine.a(hbCamera.o)(.text+0x3bb): In function `Habitat::Game::hbCamera::hbCamera[not-in-charge](char const*)':
: undefined reference to `Habitat::Render::hbBaseViewport::hbBaseViewport[in-charge](int, int, int, int)'
../lib/linux/libHabitatGameEngine.a(hbCamera.o)(.text+0x62b): In function `Habitat::Game::hbCamera::hbCamera[in-charge](char const*)':
: undefined reference to `Habitat::Render::hbBaseViewport::hbBaseViewport[in-charge](int, int, int, int)'
collect2: ld returned 1 exit status
make: *** [testSDL] Error 1