xgo
xgo copied to clipboard
C source files not allowed when not using cgo
I'm trying to build a package that imports github.com/tHinqa/outside with --targets=windows/386, and xgo issues the following error when building the imported package that contains a C file. Nothing much special about this setup. I tried with CGO_ENABLED=1 just in case, but it doesn't make any difference. Am I doing something obviously wrong?
Checking docker installation...
Client:
Version: 18.02.0-ce
API version: 1.36
Go version: go1.9.3
Git commit: fc4de44
Built: Wed Feb 7 21:16:38 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.02.0-ce
API version: 1.36 (minimum version 1.12)
Go version: go1.9.3
Git commit: fc4de44
Built: Wed Feb 7 21:15:09 2018
OS/Arch: linux/amd64
Experimental: false
Checking for required docker image karalabe/xgo-latest... found.
Cross compiling agent/cmd/pnm-agent...
Building locally agent/cmd/pnm-agent...
Compiling for windows-4.0/386...
../../../util/dll/dll.go:4:2: C source files not allowed when not using cgo or SWIG: outside.c
2018/02/16 11:35:44 Failed to cross compile package: exit status 1.