如何交叉编译

I'm just building simple application for linux ARM64 bit architecture from linux amd64 bit architecture but at time of building GOlang builder giving error to binding some libraries as below

go build github.com/DataDog/zstd: build constraints exclude all Go files in

I just wanted to know that for building different cross compile architecture is any libraries of that particular architecture is needed? ex. if I'm building for ARM64 libraries then ARM64 supported libraries installed on my system?

Thanks

Try setting environmental variable as follows. You may need to go get your external dependencies first after that, before you'll go build. GOARCH = "arm64"