[xsd-users] Missing includes in code generated from AIXM 5.1

Guillermo Frontera gfrontera at ucm.es
Wed Feb 21 12:24:39 EST 2018


Hello,

I am generating C++ code from the AIXM 5.1 XML Schema
<http://aixm.aero/page/aixm-51-specification>, but the code generated fails
to compile due to some includes that appear to be missing. I tried using
the latest stable version of CodeSynthesis XSD as well as the latest
pre-release binaries <https://codesynthesis.com/~boris/tmp/xsd/4.1.0.a11/>
I could find (4.1.0a11).

The C++ code was generated by typing the following commands into a terminal
(I used Ubuntu 17.10):

$ wget
http://aixm.aero/sites/aixm.aero/files/imce/AIXM51/aixm-5-1-20100201-xsd.zip
$ unzip aixm-5-1-20100201-xsd.zip
$ mkdir gen
$ xsd cxx-tree --std c++11 --output-dir gen --generate-polymorphic
--polymorphic-type-all --file-per-type --namespace-map
http://www.opengis.net/gml/3.2=gml xsd/ISO_19136_Schemas/gml.xsd

Once generated, the code was compiled using a very standard CMake script
that is attached.

Best regards,
Guillermo
-------------- next part --------------
cmake_minimum_required(VERSION 3.6)

project(aixm CXX)

file(GLOB_RECURSE SOURCE_FILES ${PROJECT_SOURCE_DIR}/gen/*.cxx)
add_library(aixm SHARED ${SOURCE_FILES})
set_property(TARGET aixm PROPERTY CXX_STANDARD 11)
find_package(XercesC REQUIRED)
target_link_libraries(aixm ${XercesC_LIBRARIES})


More information about the xsd-users mailing list