[xsd-users] Cross compile c++ classes to use in openwrt

Micael Santos msantos at isaenergy.pt
Wed May 6 07:36:15 EDT 2015


Hello,

Recently I have been trying to use codesynthesis to generate c++ classes from a xml schema for an embedded board that uses openwrt as it's operating system.
So far I have been able to compile the xerces-c library using the feed bellow and it seems to be working fine.
https://github.com/openwrt/packages/blob/master/libs/libxerces-c/Makefile

Now when I try to execute the "hello world" example bellow I can't make it work on my board. But when I try it on my PC works fine.
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#2

I'm using eclipse to do the cross compiling which is been working fine for the other code using the following setttings
                Included libraries -   xerces-c
                Compiler - i486-openwrt-linux-g++

I installed the package "xsd_4.0.0-1_i386.deb" on my computer in order to able to generate the c++ classes using the command
$ xsd cxx-tree hello.xsd

The only thing I had to "cheat" was copying the folder "/usr/include/xsd" to my cross compiler includes folder. I think probably the copying of the header was not the way to go  but since it compiled afterwards I assumed it was ok.

The problem is that I can't make the program run, getting the following output. When I compile it and run it on my pc without the cross compile it works fine.

/tmp/hello.xml:1:29 error: no declaration found for element 'hello'
/tmp/hello.xml:1:39 error: no declaration found for element 'greeting'
/tmp/hello.xml:1:61 error: no declaration found for element 'name'
/tmp/hello.xml:1:77 error: no declaration found for element 'name'
/tmp/hello.xml:1:94 error: no declaration found for element 'name'
Segmentation fault

I tried everything that crossed my mind so far without luck. Anyone has any ideia what I'm making wrong?
Do I need to compile the entire "XSD" using my cross compiler? And if so how will I call xsd from my pc since it was compiled for other platform?
I'm sure must be something really simple but I'm kinda stuck :(

Thanks for the help

Micael Santos - Systems Engineer




Phone: (+351) 239 791 400

[ISA]

www.isaenergy.pt<http://www.isaenergy.pt/>

[Facebook]<http://www.facebook.com/isaenergy.pt>  [Twitter] <http://twiter.com/ISAEnergy>   [LinkedIn] <https://www.linkedin.com/company/isa-energy>   [YouTube] <https://www.youtube.com/user/isaenergy>   [GooglePlus] <https://plus.google.com/101631988438714584229>

DISCLAIMER
This message is confidential and intended exclusively for the addressee. If you received this message by mistake please inform the sender and delete the message and attachments. No confidentiality nor any privilege regarding the information is waived or lost by any mistransmission. Any views or opinions contained in this message are solely those of the author, and do not necessarily represent those of ISA Energy, unless specifically stated and the sender is authorized to do so.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 11012 bytes
Desc: image001.jpg
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image001.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 281 bytes
Desc: image002.png
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 381 bytes
Desc: image003.png
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 2944 bytes
Desc: image004.png
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 357 bytes
Desc: image005.png
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image005.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 431 bytes
Desc: image006.png
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20150506/7857b461/image006.png


More information about the xsd-users mailing list