Linker problems under VC8 with Ogre

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

slog
Just popping in
Just popping in
Posts: 3
Joined: Fri Mar 03, 2006 04:24
Location: Sydney
Contact:

Linker problems under VC8 with Ogre

Postby slog » Mon Mar 06, 2006 02:13

Apologies if this isn't the right place to post this question, but I have a problem with building the 0.4.1 version of CEGUI and getting the Ogre gui renderer (Ogre v1.07) to see some of the symbols. I am using VC8.

In the "OgreGUIRenderer" project, the following code causes a linker error:

throw InvalidRequestException((utf8*)"OgreCEGUIResourceProvider::loadRawDataContainer - Unable to open resource file '" + filename + (utf8*)"' in resource group '" + orpGroup + (utf8*)"'.");

On closer investigation, however, the following will link successfully:

String result = (utf8*)"OgreCEGUIResourceProvider::loadRawDataContainer - Unable to open resource file '" + filename;


but this won't:

result = filename + (utf8*)"OgreCEGUIResourceProvider::loadRawDataContainer - Unable to open resource file '";


The linker gives the following error message:

OgreCEGUIResourceProvider.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class CEGUI::String __cdecl CEGUI::operator+(class CEGUI::String,char const *)" (__imp_??HCEGUI@@YA?AVString@0@V10@PBD@Z) referenced in function "public: virtual void __thiscall CEGUI::OgreCEGUIResourceProvider::loadRawDataContainer(class CEGUI::String const &,class CEGUI::RawDataContainer &,class CEGUI::String const &)" (?loadRawDataContainer@OgreCEGUIResourceProvider@CEGUI@@UAEXABVString@2@AAVRawDataContainer@2@0@Z)

With these problematic lines commented out, everything compiles, links and runs fine (or at least, seemingly :-) ). Still, I shouldn't need to comment out these lines. No one else seems to have had this same problem, so any help would be greatly appreciated.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Mar 06, 2006 06:16

This is actuallu quite a common issue that people have when trying to update the CEGUI version from the one that comes in the Ogre dependency pack.

The code that you are compiling is picking up the old 0.3.0 version headers that come with Ogre, rather than the new ones you should be compiling against. In order to fix this you must delete all of the CEGUI headers, libs and dlls from the Ogre dependencies and replace them with the new headers, and freshly compiled libs and dlls from the newer CEGUI version.

HTH

CE.

slog
Just popping in
Just popping in
Posts: 3
Joined: Fri Mar 03, 2006 04:24
Location: Sydney
Contact:

Postby slog » Mon Mar 06, 2006 22:41

Thankyou. That has done the trick.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests