[xsd-users] Problem linking with VS 2008
Thomas Dobroth
dobroth at gmail.com
Sat Jan 21 18:43:41 EST 2012
Boris,
Thanks for getting back to me quickly, and sorry for my late reply.
The linking problem was solved by using a non-clr project.
Thanks
I immediately ran into another problem that I cannot explain:
I am trying to parse a GPX file (standard output from a gps reciever). See:
"http://www.topografix.com/GPX/1/1"
Using simple code:
*#include "stdafx.h"
#include "gpx.hxx"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
try
{
auto_ptr<GPX::gpxType> gg =
GPX::gpx("C:\\Users\\Tom\\Documents\\gpsPhotoTagger_Workspace\\7069.gpx");
}
catch(const xml_schema::exception & e)
{
int junk=0;
}
return 0;
}*
The gpx function throws an error.
If i remove the try/catch block, the debugger shows a diagnostics_ array
with 100000+ rows stating that the all the elements were not recognized.
[0] = {severity_={...}
id_="C:\Users\Tom\Documents\gpsPhotoTagger_Workspace\7069.gpx" line_=2 ...}
+ message_ "no declaration found for element 'gpx'"
std::basic_string<char,std::char_traits<char>,std::allocator<char> >
gpx is the root element for a gpx file.
Any help would be appreciated.
Thanks,
Tom
On 1/11/2012 5:51 AM, Boris Kolpackov wrote:
> Hi Thomas,
>
> Thomas Dobroth<dobroth at gmail.com> writes:
>
>> 1>gpx.obj : error LNK2028: unresolved token (0A00000F) "public: virtual
>> __clrcall xercesc_3_1::IllegalArgumentException::~IllegalArgumentException(void)"
> Are you linking your program with the Xerces-C++ library? Check the
> "Using XSD with Microsoft Visual Studio" Wiki page, in particular,
> step 9 in the section for VS 2008:
>
> http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio
>
> Also, that '__clrcall' in the symbol is very suspicious. Is your
> application by any chance using .Net C++ (aka C++/CLI)? Note that
> XSD (and Xerces-C++) can only be used in native C++ applications.
>
> Boris
More information about the xsd-users
mailing list