When compiling the go project under windowds, when you perform the following operations:
SET CGO_ENABLED = 0 set GOARCH = amd64 set GOOS = linux go build main.go
The operation of set GOOS= linux is followed by a space after the linux, the compiler cannot automatically remove the space, causing the compilation to fail.
end!
Similar Posts:
- Always building workspace (sleeping) after eclipse starts
- $GOPATH not set [How to Solve]
- [Solved] TypeError Error: Cannot read property ‘0’ of undefined
- Git Error: Unable to create ‘D:/xxx/.git/index.lock’: File exists. Another git process seems to be running in this repository, e.g.an editor opened by ‘git commit’. Please make sure all p
- error adding symbols: DSO missing from command line
- [Solved] codeblocks Error: ‘to_string’ was not declared in this scope
- [Solved] Error: No module factory available for dependency type: ContextElementDependency
- [Solved] Gitlab-runner Error: ERROR: Could not create cache adapter error=cache factory not found: factory for cache adapter “” was not registered
- Automatic compilation of visual build professional
- fatal error C1010: unexpected end of file while…