Alberto, 

I found it while writing my reply to you, thank you. 

C++:
/Od /I "..\..\..\.." /I "\3pty\ace_5_5_0.vc8" /I "\3pty\openssl_0_9_8e" /I 
"\3pty\xerces-c_2_8_0-x86-windows-vc_8_0\include" /D "WIN32" /D "_DEBUG" /D 
"ACE_AS_STATIC_LIBS" /D "XML_LIBRARY" /D "_WIN32_WINNT=0x0500" /D 
"_CRT_SECURE_NO_DEPRECATE" /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Za /Fo"Debug\\" 
/Fd"Debug\vc80.pdb" /W3 /nologo /c /Wp64 /ZI /TP /errorReport:prompt

Linker: 
/VERBOSE /OUT:"C:\Source\ 
trunk\components\recordfile\unittest\Debug\UnitTest2.exe" /INCREMENTAL /NOLOGO 
/LIBPATH:"\3pty\ace_5_5_0.vc8\lib" /LIBPATH:"\3pty\openssl_0_9_8e\lib.dbg" 
/LIBPATH:"\3pty\xerces-c_2_8_0-x86-windows-vc_8_0\lib" /MANIFEST 
/MANIFESTFILE:"Debug\UnitTest2.exe.intermediate.manifest" /DEBUG 
/PDB:"c:\Source\trunk\components\recordfile\unittest\debug\UnitTest2.pdb" 
/SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT xerces-c_2D.lib  
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

>From the documentation: 
"If you are linking your application to a static library, then you will need to 
compile your application with the XML_LIBRARY preprocessor define in order to 
turn off the DLL import/export mechanism." 

But I am not using the static library, so I guess I shouldn't define the 
XML_LIBRARY. I'm going to figure out why this was not a problem with the 
project when we were using xercesc 2.7.0. Maybe something else has changed here 
too. 

Thank you! 

Oscar Lindberg

-----Ursprungligt meddelande-----
Från: Alberto Massari [mailto:[EMAIL PROTECTED] 
Skickat: den 8 januari 2008 18:00
Till: [email protected]
Ämne: Re: SV: VC8 migration problems 2.7.0 -> 2.8.0

Oscar,
can you open the project properties, expand the Linker node, select the 
Command Line node, and post its content?

Alberto

Oscar Lindberg wrote:
> 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]

Reply via email to