[xsd-users] Compiling XSD with Qt Creator (Qt v4.6)

Jim Pacyga jim.pacyga at control-pt.com
Wed May 5 16:22:25 EDT 2010


Hi Boris,

> If that's the case, try to put the xerces-c-3.1.1\src path first or
uninstall the Xerces-C++ headers.

Putting the "xerces-c-3.1.1\src" first seems to have done the trick.  Now
I'm compiling and linking without any errors.  Thank you for your help!


My xml_example.pro now looks like this:

TARGET = xml_example
TEMPLATE = app
LIBS += -L"C:\Program Files\CodeSynthesis XSD 3.3\xerces-c-3.1.1\src\.libs"
\
    -lxerces-c
INCLUDEPATH += "C:\Program Files\CodeSynthesis XSD 3.3\xerces-c-3.1.1\src" \
    "C:\Program Files\CodeSynthesis XSD 3.3\include"
SOURCES += main.cpp \
    VhmVddmMsgsV0_0.cxx
HEADERS += VhmVddmMsgsV0_0.hxx



Now to give this all a spin...

Jim




----------------------------------
Jim Pacyga
Software Engineer
Control Point Corporation
(248) 740-1512 x227


-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Wednesday, May 05, 2010 4:06 PM
To: Jim Pacyga
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] Compiling XSD with Qt Creator (Qt v4.6)

Hi Jim,

Jim Pacyga <jim.pacyga at control-pt.com> writes:

> If it helps, the following lists my "main.cpp" file (which does
> nothing but include my generated class) and the Qt .pro file.  
> You should easily be able to reproduce this (using your own 
> generated .h file from XSD) using Qt Creator.

I tried your project but apparently I need a Qt SDK to build
anything with Qt Creator (I only downloaded the IDE). So I 
am getting the whole thing now. I have some suggestions in
the meantime:


> INCLUDEPATH += "C:\Program Files\CodeSynthesis XSD 3.3\include" \
>                "C:\Program Files\CodeSynthesis XSD 3.3\xerces-c-3.1.1\src"

I don't know if you installed Xerces-C++ headers when installing
XSD-3.3.msi. If you did then they will be placed into the include
directory and the C++ compiler will pick them up instead of the 
ones from the second path. This would be consistent with the errors
that you get (those headers would cause the symbols to be DLL-imported).

If that's the case, try to put the xerces-c-3.1.1\src path first or
uninstall the Xerces-C++ headers.

Boris



More information about the xsd-users mailing list