Page 1 of 1

Ogre 1.00 R1 and using ::setText()

Posted: Thu Feb 10, 2005 21:39
by Van
I am porting to Ogre 1.00 RC1.

My app, which was working prior to the port is now having a linker problem.

First, It appears that I had to replace all the CEGUI::Strings with Ogre::Strings. Is this true? Or am I missing something here too?

Next, I am getting a linker error:

Code: Select all

clsApplicationFL.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::String(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0String@CEGUI@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: virtual bool __thiscall clsApplicationFL::frameEnded(struct Ogre::FrameEvent const &)" (?frameEnded@clsApplicationFL@@UAE_NABUFrameEvent@Ogre@@@Z)
clsCameraDialog.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::String(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0String@CEGUI@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug/GPE.exe : fatal error LNK1120: 1 unresolved externals


on all elements that do anything similar to:

Code: Select all

   mGuiOrtho[i]->setText(mStr);


I am including the following libs:
OgreMain_d.lib
CEGUIBase_d.lib
OgreGUIRenderer_d.lib


What am I missing?

Re: Ogre 1.00 R1 and using ::setText()

Posted: Fri Feb 11, 2005 00:41
by Mdobele
I have only ever used Ogre::Strings sorry but I can help you with them. When passing them around you can simply go.

Ogre::String MyString( " Some Text " ) ;
CEGUIThing->setText( MyString.c_str() );

Re: Ogre 1.00 R1 and using ::setText()

Posted: Fri Feb 11, 2005 09:47
by CrazyEddie
CEGUI is not a part of Ogre, so any CEGUI elements will always use CEGUI::String. No changes have been made in this area, and no changes are planned in this area.

If you need to use an Ogre::String with CEGUI then you use the c_str() method as directed by Mdobele.

As for the linker errors, I woul need to see some of the offending code.

CE.