shaxbee / go-spatialite

Spatialite SQL Driver for Golang
MIT License
57 stars 15 forks source link

cross compilation #1

Open missinglink opened 7 years ago

missinglink commented 7 years ago

heya,

I'm trying to cross-compile a binary containing this library from my host OS of ubuntu linux for arm darwin and windows but I am getting the following error:

[compile] linux x64
[compile] linux arm
# github.com/shaxbee/go-spatialite
../../shaxbee/go-spatialite/spatialite.go:23: undefined: sqlite3.SQLiteDriver

Do you have any idea how I could go about doing this? would I need to compile spatialite for each OS and then include the relevant .so files?

My binary also contains github.com/mattn/go-sqlite3 and that cross-compiles fine.

I'm not that familiar with CGO and how it works.

Thanks