Thanks Alberto, right on the mark!

Fabio




Alberto Massari <[EMAIL PROTECTED]> 
01/18/2008 05:30 PM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: Xerces with VC++ forms






Hi Fabio,
VC2005 is assuming that Xerces is a CLR library; you probably have the 
/clr:pure option specified (the wizard sets it when you create a Windows 
Forms Application), so you need to go to the Properties of the project, 
and under Configuration Properties -> General, change "Common Language 
Runtime support" to say "Common Language Runtime Support (/clr)".

Alberto

Fabio Finotto wrote:
> I eventually got to make a console application compiling in VC++ 2005 
> Express Edition including xerces and a sample example.
>
> I then tried with a new Windows Forms Application (generated using VC's 
> templates), and added the lib files to the linker input. Now, just by 
> adding:
>
> #include<xercesc/util/PlatformUtils.hpp>
>
> to stdafx.h causes the compiler to give a ton of messages of the kind:
>
> 1>Compiling...
> 1>stdafx.cpp
> 1>C:\Program 
> 
Files\xerces-c_2_8_0-x86-windows-vc_8_0\include\xercesc/util/XMemory.hpp(55) 

> : warning C4272: 'xercesc_2_8::XMemory::operator new' : is marked 
> __declspec(dllimport); must specify native calling convention when 
> importing a function.
> 1>C:\Program 
> 
Files\xerces-c_2_8_0-x86-windows-vc_8_0\include\xercesc/util/XMemory.hpp(65) 

> : warning C4272: 'xercesc_2_8::XMemory::operator new' : is marked 
> __declspec(dllimport); must specify native calling convention when 
> importing a function.
>
> and after many lines like that, several of:
>
> 1>Compiling resources...
> 1>Linking...
> 1>stdafx.obj : error LNK2028: unresolved token (0A00000E) "public: 
virtual 
> __clrcall 
> 
xercesc_2_8::XMLPlatformUtilsException::~XMLPlatformUtilsException(void)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) referenced in 
> function "public: virtual void * __clrcall 
> xercesc_2_8::XMLPlatformUtilsException::`vector deleting 
> destructor'(unsigned int)" 
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED])
> 1>stdafx.obj : error LNK2028: unresolved token (0A00000F) "public: 
virtual 
> class xercesc_2_8::XMLException * __clrcall 
> xercesc_2_8::XMLPlatformUtilsException::duplicate(void)const " 
> 
([EMAIL PROTECTED]@xercesc_2_8@@[EMAIL PROTECTED]@XZ) 

> referenced in function "void __clrcall `dynamic initializer for 'const 
> xercesc_2_8::XMLPlatformUtilsException::`local vftable'''(void)" 
> 
([EMAIL PROTECTED]@@6B@@@[EMAIL PROTECTED]@@$$FYMXXZ)
>
>
> Can you help?
> What I basically need to do is to read XML files and show them using a 
> TreeView object.
>
> Thanks&regards,
> Fabio
> 




Reply via email to