Linker problems under VC8 with Ogre
Posted: 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.
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
