terminalstatic / go-xsd-validate

Xsd validation for go based on libxml2
MIT License
69 stars 18 forks source link

Cross compiling for Windows under Linux #18

Open andreas-j-hauser opened 9 months ago

andreas-j-hauser commented 9 months ago

Under Linux I want to cross compile my project with xsd-validate module for Windows platform. For Linux platform the build runs and the executable works. But If I try to build for Windows I go following message and the build fails.

Under Linux I installed version 2.9.12 of libxml2

../../internal/datamodel/datamodel.go:57:14: undefined: xsdvalidate.Init
../../internal/datamodel/datamodel.go:58:20: undefined: xsdvalidate.Cleanup
../../internal/datamodel/datamodel.go:59:33: undefined: xsdvalidate.NewXsdHandlerMem
../../internal/datamodel/datamodel.go:59:105: undefined: xsdvalidate.ParsErrDefault
../../internal/datamodel/datamodel.go:65:33: undefined: xsdvalidate.NewXmlHandlerMem
../../internal/datamodel/datamodel.go:65:74: undefined: xsdvalidate.ParsErrDefault
../../internal/datamodel/datamodel.go:72:52: undefined: xsdvalidate.ValidErrDefault

Can I use xsd-validate for Windows? What I have to do to compile my project for Windows under Linux?

Thank you very much Andreas

terminalstatic commented 9 months ago

Sorry, never needed that. From what I gathered from a quick google search it might be doable but even the short reading I did about how to possibly set this up gave me a headache, so I‘m afraid you‘d have to figure this out for yourself.