[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-users
Subject:    Re: Xerces with VC++ forms
From:       "Fabio Finotto" <ffinotto () moog ! com>
Date:       2008-01-21 2:02:07
Message-ID: OFCD4AE1E5.21D7CE35-ON482573D7.000B0FB4-482573D7.000B2CBD () moog ! com
[Download RAW message or body]

--=_alternative 000B2BDB482573D7_=
Content-Type: text/plain; charset="US-ASCII"

Thanks Alberto, right on the mark!

Fabio




Alberto Massari <amassari@datadirect.com> 
01/18/2008 05:30 PM
Please respond to
c-users@xerces.apache.org


To
c-users@xerces.apache.org
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)" 
> (??1XMLPlatformUtilsException@xercesc_2_8@@$$FUAM@XZ) referenced in 
> function "public: virtual void * __clrcall 
> xercesc_2_8::XMLPlatformUtilsException::`vector deleting 
> destructor'(unsigned int)" 
> (??_EXMLPlatformUtilsException@xercesc_2_8@@$$FUAMPAXI@Z)
> 1>stdafx.obj : error LNK2028: unresolved token (0A00000F) "public: 
virtual 
> class xercesc_2_8::XMLException * __clrcall 
> xercesc_2_8::XMLPlatformUtilsException::duplicate(void)const " 
> 
(?duplicate@XMLPlatformUtilsException@xercesc_2_8@@$$FUBMPAVXMLException@2@XZ) 

> referenced in function "void __clrcall `dynamic initializer for 'const 
> xercesc_2_8::XMLPlatformUtilsException::`local vftable'''(void)" 
> 
(???__E??_SXMLPlatformUtilsException@xercesc_2_8@@6B@@@YMXXZ@?A0x6cdf1933@@$$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
> 





--=_alternative 000B2BDB482573D7_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic