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]