Linking Problems

Princess_Conecloon

10-04-2006 19:31:24

I am trying to compile the Newton example in the wiki and can get a succesful compile if I remove the lines:

mOgreNewtListener = new OgreNewt::BasicFrameListener( mWindow, mCamera, mSceneMgr, mWorld, 120 );
mRoot->addFrameListener( mOgreNewtListener );


Without those two lines, I can compile and run the example. When I compile those two lines with the program, I get the following linking errors:

Linking executable: ..\NewtonDerived\TestArchive\Newton.exe
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text+0x4a4): undefined reference to `Ogre::LogManager::logMessage(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, Ogre::LogMessageLevel, bool)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text+0x79b): undefined reference to `Ogre::LogManager::logMessage(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, Ogre::LogMessageLevel, bool)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text$_ZN20ExampleFrameListenerC2EPN4Ogre12RenderWindowEPNS0_6CameraEbb[ExampleFrameListener::ExampleFrameListener(Ogre::RenderWindow*, Ogre::Camera*, bool, bool)]+0x147): undefined reference to `Ogre::OverlayManager::getByName(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text$_ZNK11stlpmtx_std12_String_baseIcNS_9allocatorIcEEE21_M_throw_length_errorEv[stlpmtx_std::_String_base<char, stlpmtx_std::allocator<char> >::_M_throw_length_error() const]+0xe): undefined reference to `stlpmtx_std::__stl_throw_length_error(char const*)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text+0x1a2): undefined reference to `Ogre::SimpleRenderable::setMaterial(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text+0x4a0): undefined reference to `Ogre::SimpleRenderable::setMaterial(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.rdata$_ZTV6Line3D[vtable for Line3D]+0x30): undefined reference to `Ogre::ShadowCaster::generateShadowVolume(Ogre::EdgeData*, Ogre::HardwareIndexBufferSharedPtr, Ogre::Light const*, stlpmtx_std::vector<Ogre::ShadowRenderable*, stlpmtx_std::allocator<Ogre::ShadowRenderable*> >&, unsigned long)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN4Ogre14AnimableObject19createAnimableValueERKN11stlpmtx_std12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE[Ogre::AnimableObject::createAnimableValue(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)]+0x137): undefined reference to `Ogre::Exception::Exception(int, stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, char*, long)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN4Ogre8any_castIPNS_17UserDefinedObjectEEET_RKNS_3AnyE[Ogre::UserDefinedObject* Ogre::any_cast<Ogre::UserDefinedObject*>(Ogre::Any const&)]+0x1d8): undefined reference to `Ogre::Exception::Exception(int, stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, char*, long)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEED2Ev[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::~basic_ios()]+0x16): undefined reference to `stlpmtx_std::ios_base::~ios_base()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEED2Ev[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::~basic_streambuf()]+0x19): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std8ios_base23_M_check_exception_maskEv[stlpmtx_std::ios_base::_M_check_exception_mask()]+0x1d): undefined reference to `stlpmtx_std::ios_base::_M_throw_failure()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE4initEPNS_15basic_streambufIcS2_EE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::init(stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >*)]+0x5e): undefined reference to `stlpmtx_std::locale::locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE4initEPNS_15basic_streambufIcS2_EE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::init(stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >*)]+0x8c): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE4initEPNS_15basic_streambufIcS2_EE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::init(stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >*)]+0xaf): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE4initEPNS_15basic_streambufIcS2_EE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::init(stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >*)]+0xd9): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x54): undefined reference to `stlpmtx_std::ios_base::imbue(stlpmtx_std::locale const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x91): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x9f): undefined reference to `stlpmtx_std::ctype<char>::id'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0xb1): undefined reference to `stlpmtx_std::locale::_M_get_facet(stlpmtx_std::locale::id const&) const'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0xc8): undefined reference to `stlpmtx_std::numpunct<char>::id'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0xd3): undefined reference to `stlpmtx_std::locale::_M_get_facet(stlpmtx_std::locale::id const&) const'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x183): undefined reference to `stlpmtx_std::ios_base::imbue(stlpmtx_std::locale const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x19f): undefined reference to `stlpmtx_std::locale::operator=(stlpmtx_std::locale const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x200): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x220): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEE5imbueERKNS_6localeE[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::imbue(stlpmtx_std::locale const&)]+0x287): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::pubimbue(stlpmtx_std::locale const&)]+0x66): undefined reference to `stlpmtx_std::locale::locale(stlpmtx_std::locale const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::pubimbue(stlpmtx_std::locale const&)]+0x82): undefined reference to `stlpmtx_std::locale::operator=(stlpmtx_std::locale const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEE8pubimbueERKNS_6localeE[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::pubimbue(stlpmtx_std::locale const&)]+0xa5): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEEC2Ev[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::basic_streambuf()]+0x55): undefined reference to `stlpmtx_std::locale::locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEEC2Ev[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::basic_ios()]+0xd): undefined reference to `stlpmtx_std::ios_base::ios_base()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEED0Ev[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::~basic_ios()]+0x16): undefined reference to `stlpmtx_std::ios_base::~ios_base()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9basic_iosIcNS_11char_traitsIcEEED1Ev[stlpmtx_std::basic_ios<char, stlpmtx_std::char_traits<char> >::~basic_ios()]+0x16): undefined reference to `stlpmtx_std::ios_base::~ios_base()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEED0Ev[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::~basic_streambuf()]+0x19): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std15basic_streambufIcNS_11char_traitsIcEEED1Ev[stlpmtx_std::basic_streambuf<char, stlpmtx_std::char_traits<char> >::~basic_streambuf()]+0x19): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std10_M_put_numIcNS_11char_traitsIcEEPKvEERNS_13basic_ostreamIT_T0_EES9_T1_[stlpmtx_std::basic_ostream<char, stlpmtx_std::char_traits<char> >& stlpmtx_std::_M_put_num<char, stlpmtx_std::char_traits<char>, void const*>(stlpmtx_std::basic_ostream<char, stlpmtx_std::char_traits<char> >&, void const*)]+0x15bInfo: resolving Ogre::Quaternion::IDENTITY by linking to __imp___ZN4Ogre10Quaternion8IDENTITYE (auto-import)
Info: resolving Ogre::Vector3::ZERO by linking to __imp___ZN4Ogre7Vector34ZEROE (auto-import)
Info: resolving Ogre::Math::fDeg2Rad by linking to __imp___ZN4Ogre4Math8fDeg2RadE (auto-import)
Info: resolving vtable for Ogre::MeshPtrby linking to __imp___ZTVN4Ogre7MeshPtrE (auto-import)
Info: resolving Ogre::Renderable::msDummyPlaneList by linking to __imp___ZN4Ogre10Renderable16msDummyPlaneListE (auto-import)
Info: resolving Ogre::StringUtil::BLANK by linking to __imp___ZN4Ogre10StringUtil5BLANKE (auto-import)
): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std10_M_put_numIcNS_11char_traitsIcEEPKvEERNS_13basic_ostreamIT_T0_EES9_T1_[stlpmtx_std::basic_ostream<char, stlpmtx_std::char_traits<char> >& stlpmtx_std::_M_put_num<char, stlpmtx_std::char_traits<char>, void const*>(stlpmtx_std::basic_ostream<char, stlpmtx_std::char_traits<char> >&, void const*)]+0x17e): undefined reference to `stlpmtx_std::locale::~locale()'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZN11stlpmtx_std9use_facetINS_7num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEEEERKT_RKNS_6localeE[stlpmtx_std::num_put<char, stlpmtx_std::ostreambuf_iterator<char, stlpmtx_std::char_traits<char> > > const& stlpmtx_std::use_facet<stlpmtx_std::num_put<char, stlpmtx_std::ostreambuf_iterator<char, stlpmtx_std::char_traits<char> > > >(stlpmtx_std::locale const&)]+0x15): undefined reference to `stlpmtx_std::locale::_M_use_facet(stlpmtx_std::locale::id const&) const'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(Line3D.o):Line3D.cpp:(.text$_ZNK11stlpmtx_std8ios_base6getlocEv[stlpmtx_std::ios_base::getloc() const]+0x18): undefined reference to `stlpmtx_std::locale::locale(stlpmtx_std::locale const&)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 16 seconds)
0 errors, 22 warnings


I am using Code::Blocks with MingW and STLPort with Ogre 1.2, have compiled OgreNewt from source and have included all the same directories as are in the demos that come with the OgreNewt source (which I am unable to compile also). Any help would be appreciated.

(Also, I couldn't compile the Newton DLL's for some reason, so I only compiled on the 'Release' and 'Debug' settings, can I still run OgreNewt with just those libraries? Or do I have to compile those also?)

me_go_fast

10-04-2006 21:48:46

It looks to me like you need to include the Line3d.cpp file in your project. That should solve the problem because the Line3d.cpp is needed for the basic frame listener. :D

Evak

10-04-2006 22:08:17

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=550

I had a similar problem and didn't realise that I had to add the line3d.cpp with add file to current project option in the menus (something like that anyway) You can't just add it to your list of includes directories.

Worked for me anyway.

Princess_Conecloon

11-04-2006 00:43:46

I already had Line3d.cpp and Line3d.h in the OgreNewt source. Was I supposed to add it to my project files also, or just to the project file and not the source? Anyway, I tried adding the Line3d files to my project (without recompiling OgreNewt w/o the Line3d files) and I came up with this set of linker errors:

Linking executable: ..\NewtonDerived\TestArchive\Newton.exe
Info: resolving Ogre::Quaternion::IDENTITY by linking to __imp___ZN4Ogre10Quaternion8IDENTITYE (auto-import)
Info: resolving Ogre::Vector3::ZERO by linking to __imp___ZN4Ogre7Vector34ZEROE (auto-import)
Info: resolving Ogre::Math::fDeg2Rad by linking to __imp___ZN4Ogre4Math8fDeg2RadE (auto-import)
Info: resolving Ogre::Renderable::msDummyPlaneList by linking to __imp___ZN4Ogre10Renderable16msDummyPlaneListE (auto-import)
Info: resolving Ogre::StringUtil::BLANK by linking to __imp___ZN4Ogre10StringUtil5BLANKE (auto-import)
Info: resolving vtable for Ogre::MeshPtrby linking to __imp___ZTVN4Ogre7MeshPtrE (auto-import)
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text+0x4a4): undefined reference to `Ogre::LogManager::logMessage(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, Ogre::LogMessageLevel, bool)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text+0x79b): undefined reference to `Ogre::LogManager::logMessage(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, Ogre::LogMessageLevel, bool)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text$_ZN20ExampleFrameListenerC2EPN4Ogre12RenderWindowEPNS0_6CameraEbb[ExampleFrameListener::ExampleFrameListener(Ogre::RenderWindow*, Ogre::Camera*, bool, bool)]+0x147): undefined reference to `Ogre::OverlayManager::getByName(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)'
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_BasicFrameListener.o):OgreNewt_BasicFrameListener.cpp:(.text$_ZNK11stlpmtx_std12_String_baseIcNS_9allocatorIcEEE21_M_throw_length_errorEv[stlpmtx_std::_String_base<char, stlpmtx_std::allocator<char> >::_M_throw_length_error() const]+0xe): undefined reference to `stlpmtx_std::__stl_throw_length_error(char const*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 21 seconds)
0 errors, 24 warnings


EDIT: I also added OgreNewt_BasicFrameListener code and header files, now I only get one error:

Linking executable: ..\NewtonDerived\TestArchive\Newton.exe
Info: resolving Ogre::Quaternion::IDENTITY by linking to __imp___ZN4Ogre10Quaternion8IDENTITYE (auto-import)
Info: resolving Ogre::Vector3::ZERO by linking to __imp___ZN4Ogre7Vector34ZEROE (auto-import)
Info: resolving Ogre::Math::fDeg2Rad by linking to __imp___ZN4Ogre4Math8fDeg2RadE (auto-import)
Info: resolving Ogre::Renderable::msDummyPlaneList by linking to __imp___ZN4Ogre10Renderable16msDummyPlaneListE (auto-import)
Info: resolving Ogre::StringUtil::BLANK by linking to __imp___ZN4Ogre10StringUtil5BLANKE (auto-import)
Info: resolving vtable for Ogre::MeshPtrby linking to __imp___ZTVN4Ogre7MeshPtrE (auto-import)
C:\Ogre\ogreaddons\ogrenewt\OgreNewt_Main\lib\release/libOgreNewt_Main.a(OgreNewt_Debugger.o):OgreNewt_Debugger.cpp:(.text$_ZNK11stlpmtx_std12_String_baseIcNS_9allocatorIcEEE21_M_throw_length_errorEv[stlpmtx_std::_String_base<char, stlpmtx_std::allocator<char> >::_M_throw_length_error() const]+0xe): undefined reference to `stlpmtx_std::__stl_throw_length_error(char const*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 28 seconds)
0 errors, 27 warnings

walaber

11-04-2006 00:55:13

looks like you have something else going on... are you using OgreNewt as a static library?

also what version of Ogre are you using, on what compiler?

Princess_Conecloon

11-04-2006 01:18:47

I couldn't compile OgreNewt as a Dynamic Library, and I am using Code::Blocks with MingW and STLPort using Ogre 1.2 (latest release).

I compiled OgreNewt in Release and Debug builds and the only libraries I got out were libOgreNewt_Main.a and libOgreNewt_Main_d.a, I noticed they weren't the listed OgreNewt_Main.lib and OgreNew_Main_d.lib, did it not compile correctly? I think it is wierd that the project compiles fine when I just take out those two lines.

Princess_Conecloon

11-04-2006 05:12:41

Ok, I got it to work, but I want to know if this is just a temporary solution which will just cover up for even more errors in the future:

In my project file I have included all of the following from OgreNewt:
Line3d Code and Header
OgreNewt_BasicFrameListener Code and Header
OgreNewt_Debugger Code and Header

If that is normal then I have solved my problems :D and thanks for everyones help. If not, what should I look at to try and fix whatever is wrong?