buddyspencer I wrote something in go which uses https://github.com/mattn/go-sqlite3 and then I wanted to compile it for a mac on my solus machine, but it doesn't work because it seems like I need a cross compiler. Can anyone help me?
yursan9 You need to build C compiler with cross compile support. It's documented in the go-sqlite3 README
buddyspencer yursan9 Sorry if this sounds stupid, but where have you read this? The only thing I found was to use CGO_ENABLED=1 and I found that I need a cross compiler in one of the issues on github.
yursan9 Because it's use cgo, it need C compiler who can cross compile it. I thought it's a general knowledge when using golang library. If you don't want to build a compiler with cross compiler support, you should use pure golang library.
buddyspencer yursan9 No sorry, it wasn't in my case. We didn't learn that at the university. But now I am smarter 🙂
yursan9 Sorry If I sound condescending, English is not my native language. I'm also an university student, don't worry we can swap knowledge with each other
DasJott If it is of interest: Go can cross compile out of the box. So if that is an option, try this: GOOS=darwin GOARCH=amd64 go build -a -o myproject . This is from a makefile for an application I made for Linux, Window and Mac.
DataDrake DasJott Not if its compiling with CGO. Then you need a C compiler as well and it needs to be able to compile for the target platform.