[xsd-users] Compiliation issues on HP-UX

Sundar, Satish [IT] Satish.Sundar at sprint.com
Tue May 29 09:36:54 EDT 2007


Hi,
 
I am evaluating XSD on HP-UX platform. I am trying to compile the generated C++ source files after runnig the xsd <xsd file> command on a simple hello.xsd file. However I am getting lot of compilation errors, mostly dealing with the use of C++ Standard Library classes. I am having difficulty using the correct defines (-D<xxx>) for the aCC compiler. Can you please help? 
Here are the details
 
HP-UX  B.11.11 U 9000/800
aCC version - A.03.33
 
I am using these defines -D_HP_NAMESPACE_STD -DRWSTD_NO_NEW_HEADER while compiling and get these errors
[echo] Compiling ...
     [exec] Error 419: "/opt/aCC/include/stdexcept", line 69 # 'exception' is used as a type, but has not been defined as a type.
     [exec]     class RWSTDExport logic_error : public exception
     [exec]                                            ^^^^^^^^^
     [exec] Error 376: "/opt/aCC/include/stdexcept", line 69 # Class name expected.
     [exec]     class RWSTDExport logic_error : public exception
     [exec]                                            ^^^^^^^^^
     [exec] Error 419: "/opt/aCC/include/stdexcept", line 145 # 'exception' is used as a type, but has not been defined as a type.
     [exec]     class RWSTDExport runtime_error : public exception
     [exec]                                              ^^^^^^^^^
     [exec] Error 376: "/opt/aCC/include/stdexcept", line 145 # Class name expected.
     [exec]     class RWSTDExport runtime_error : public exception
     [exec]                                              ^^^^^^^^^
     [exec] Error 419: "/home/ssunda01/sw/XSD/xsd-2.3.1-hppa-hpux/libxsd/xsd/cxx/tree/exceptions.hxx", line 27 # 'basic_ostream' is used as a type, but has not been defined as a type.
     [exec]             std::basic_ostream<C>&
     [exec]                  ^^^^^^^^^^^^^    
     [exec] Error 318: "/home/ssunda01/sw/XSD/xsd-2.3.1-hppa-hpux/libxsd/xsd/cxx/tree/exceptions.hxx", line 27 # A template name was expected instead of '<type inserted by compiler>'. Did you forget to define the template?
     [exec]             std::basic_ostream<C>&
     [exec]                               ^^^ 
     [exec] Error 419: "/home/ssunda01/sw/XSD/xsd-2.3.1-hppa-hpux/libxsd/xsd/cxx/tree/exceptions.hxx", line 28 # 'basic_ostream' is used as a type, but has not been defined as a type.
     [exec]             operator<< (std::basic_ostream<C>& os, const exception& e)
     [exec]                              ^^^^^^^^^^^^^                            

I am using ANT for compiling ... and here is what I am using
  <property name="source_files" value="hello.cpp"/>
    <property name="object_files" value="hello.o" />
    <property name="binary_file" value="hello"/> 
 
<property name="MY_INC_DIR" 
        value="/home/ssunda01/sw/XSD/xsd-2.3.1-hppa-hpux/examples/cxx/tree/hello/temp"/>
 
<property name="acc.include" value="/opt/aCC/include"/>
    <property name="acc.std.include" value="/opt/aCC/include_std"/>
    <property name="usr.include" value="/usr/include"/>
    <property name="xsd.dir" value="/home/ssunda01/sw/XSD/xsd-2.3.1-hppa-hpux/libxsd"/>
 
<property name="ei_includes" value="-I. 
           -I${MY_INC_DIR}
           -I${acc.include}
           -I${acc.std.include}
           -I${usr.include}
           -I${xsd.dir}"
 
<property name="Defines" value= " -D_HP_NAMESPACE_STD -DRWSTD_NO_NEW_HEADER"/>
 
 <!-- C++ complier and linker options -->  
    <property name="compile_options" value="${Defines} -c ${ei_includes}" />
    <property name="link_options" value="${lib_paths} ${libs} -o" />
 
<target name="compile">
        <echo message="Compiling ..." />
        <exec executable="/opt/aCC/bin/aCC" failonerror="true">
            <arg line="${compile_options}" />
            <arg line="${source_files}" />
        </exec> 
    </target>
 
<!-- C++linking --> 
    <target name="link" depends="compile">
        <echo message="Linking ..." />
        <exec executable="/opt/aCC/bin/aCC" failonerror="true">
            <arg line="${link_options}" />
            <arg value="${binary_file}" />
            <arg line="${library_objects} ${object_files}" />
        </exec> 
    </target>
 
Thanks

- Satish Sundar 





More information about the xsd-users mailing list