Hello, The linker appears to be looking for a wchar_t reference. Perhaps modifying the 'Properties->C/C++->Language->Treat wchar_t as built-in type' property to 'Yes' will fix your problem.
Regards, Nicholas -----Original Message----- From: Oscar Lindberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 9:47 AM To: [email protected] Subject: SV: VC8 migration problems 2.7.0 -> 2.8.0 Hi, I still can not use 2.8.0 from vc8. This is the program I try to build with current binary release (xerces-c_2_8_0-x86-windows-vc_8_0.zip): - - - #include <xercesc/util/XMLUni.hpp> #include <xercesc/sax2/XMLReaderFactory.hpp> #include <iostream> using namespace std; XERCES_CPP_NAMESPACE_USE int main(int argc, char* argv[]) { cout << XMLUni::fgXercescDefaultLocale << endl; SAX2XMLReader* parser = XMLReaderFactory::createXMLReader(); parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, false); parser->setFeature(XMLUni::fgXercesSchema, false); std::string str = "abs"; cout << XMLString::transcode(XMLString::transcode(str.c_str())) << endl; } - - - This is the linking errors I get: RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgXercesSchema" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgSAX2CoreNameSpaces" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static class xercesc_2_8::MemoryManager * xercesc_2_8::XMLPlatformUtils::fgMemoryManager" ([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@A) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static char const * const xercesc_2_8::XMLUni::fgXercescDefaultLocale" ([EMAIL PROTECTED]@xercesc_2_8@@2QBDB) C:\Source\ecode3\trunk\components\recordfile\unittest\Debug\UnitTest2.exe : fatal error LNK1120: 4 unresolved externals As you can see, it will find both of the transcode functions, so some things do work. When I look in the .lib file, the symbol seems to look like this, with a prepended __imp_: [EMAIL PROTECTED]@xercesc_2_8@@2QB_WB The strange thing is that I can build the SAX2Count sample code included in the source release of xerces 2.8.0. When I do this it seems like it looks for the symbol prepended with __imp_, so it can build. It is becoming more and more clear that I have some problem in my project settings in VC8, or some missing #define. Something seem to have changed between 2.7.0 and 2.8.0, because it used to work. I can not figure out what the difference is between my VC8 project and the SAX2Count VC8 project. Any help what so ever would be greatly appreciated. - Oscar Lindberg -----Ursprungligt meddelande----- Från: Oscar Lindberg [mailto:[EMAIL PROTECTED] Skickat: den 7 januari 2008 17:18 Till: [email protected] Ämne: SV: VC8 migration problems 2.7.0 -> 2.8.0 Hi, I forgot to mention that I tried different combinations of "Treat wchar_t as Built-in Type", but I could not get the link errors to go away. I have been trying to solve this, but I have not managed so far. I made a short example that I can not build: #include <xercesc/util/XMLUni.hpp> #include <xercesc/sax2/XMLReaderFactory.hpp> #include <iostream> using namespace std; XERCES_CPP_NAMESPACE_USE int main(int argc, char* argv[]) { cout << XMLUni::fgXercescDefaultLocale << endl; SAX2XMLReader* parser = XMLReaderFactory::createXMLReader(); parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, false); parser->setFeature(XMLUni::fgXercesSchema, false); } I try to make this build with vc8 with the current binary release (xerces-c_2_8_0-x86-windows-vc_8_0.zip), but I can not. Still the same link errors: RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgXercesSchema" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgSAX2CoreNameSpaces" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static class xercesc_2_8::MemoryManager * xercesc_2_8::XMLPlatformUtils::fgMemoryManager" ([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@A) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static char const * const xercesc_2_8::XMLUni::fgXercescDefaultLocale" ([EMAIL PROTECTED]@xercesc_2_8@@2QBDB) If I set "Treat wchar_t as Built-in Type" to "No", get these instead: RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static unsigned short const * const xercesc_2_8::XMLUni::fgXercesSchema" ([EMAIL PROTECTED]@xercesc_2_8@@2QBGB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static unsigned short const * const xercesc_2_8::XMLUni::fgSAX2CoreNameSpaces" ([EMAIL PROTECTED]@xercesc_2_8@@2QBGB) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static class xercesc_2_8::MemoryManager * xercesc_2_8::XMLPlatformUtils::fgMemoryManager" ([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@A) RecordFileTest.obj : error LNK2001: unresolved external symbol "public: static char const * const xercesc_2_8::XMLUni::fgXercescDefaultLocale" ([EMAIL PROTECTED]@xercesc_2_8@@2QBDB) What am I doing wrong? Any ideas? - Oscar Lindberg -----Ursprungligt meddelande----- Från: Straub, Corey [mailto:[EMAIL PROTECTED] Skickat: den 4 januari 2008 19:55 Till: [email protected] Ämne: RE: VC8 migration problems 2.7.0 -> 2.8.0 Hi Oscar, Check to make sure under project properties that Treat wchar_t as Built-in Type is set to no, I had similar problems with it set as yes, I believe it is under C/C++, the language page. Hope this helps -Corey -----Original Message----- From: Oscar Lindberg [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 12:02 PM To: [email protected] Subject: VC8 migration problems 2.7.0 -> 2.8.0 Hello, I'm having some problems migrating a project from 2.7.0 to 2.8.0 in Visual Studio 2005 (vc8). The project built and worked fine when using 2.7.0. I changed my include and lib paths (and renamed the old directory, just to be sure). I do not use the static lib. Now I get the following errors: Linking... Creating library release/RecordFileTest.lib and object release/RecordFileTest.exp recordfile.lib(RecordFile.obj) : error LNK2019: unresolved external symbol "public: static char const * const xercesc_2_8::XMLUni::fgXercescDefaultLocale" ([EMAIL PROTECTED]@xercesc_2_8@@2QBDB) referenced in function "public: __thiscall RecordFile::RecordFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0RecordFile@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@std@@V?$allocato [EMAIL PROTECTED]@2@@std@@@Z) recordfile.lib(RecordFile.obj) : error LNK2019: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgXercesSchema" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) referenced in function "public: ... recordfile.lib(RecordFile.obj) : error LNK2019: unresolved external symbol "public: static wchar_t const * const xercesc_2_8::XMLUni::fgSAX2CoreNameSpaces" ([EMAIL PROTECTED]@xercesc_2_8@@2QB_WB) referenced in function "public: recordfile.lib(RecordFile.obj) : error LNK2019: unresolved external symbol "public: static class xercesc_2_8::MemoryManager * xercesc_2_8::XMLPlatformUtils::fgMemoryManager" ([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@A) referenced in function "public: release/RecordFileTest.exe : fatal error LNK1120: 4 unresolved externals I tried it with the binary distribution (xerces-c_2_8_0-x86-windows-vc_8_0.zip) and I got the same results when I build it myself from the source distribution (using the vc8 solution file). If I rename xerces-c_2D.lib temporarily and build (debug) I get this error message instead (so I know that it is linking with the lib I expect): LINK : fatal error LNK1104: cannot open file 'xerces-c_2D.lib' Since I can build all of the projects in "xerces-all.sln" for VC8, I suspect I have some errors in my project settings that simply did not show up with xerces 2.7.0. Has anyone encountered a similar problem? Has anyone got a suggestion what I should do next? Thank you! Regards, Oscar Lindberg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
