-
Notifications
You must be signed in to change notification settings - Fork 18k
import/path: gcc_linux_amd64.c: In function '_cgo_sys_thread_start' #68478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You should set |
Thanks! I add the Thanks again. |
To cross-compile a Go program for Linux on a Windows environment with
set GOOS=linux
set GOARCH=amd64
set CGO_ENABLED=1
# set `CC` to a cross compiler for linux
set CC=x86_64-linux-gnu-gcc
go build -o your_program_name |
Go version
go version go1.22.2 windows/amd64
Output of
go env
in your module/workspace:What did you do?
When I build go linux script on Windows env, the build bat script is the following:
Because I build go program to Android sdk using GoMobile, so i change the go env args
CGO_ENABLED=0
toCGO_ENABLED=1
.What did you see happen?
When I run the build bat, the error is the flowwing:
When I change
CGO_ENABLED=1
toCGO_ENABLED=0
, compiling successfully.What did you expect to see?
CGO_ENABLED=1
toCGO_ENABLED=0
, Compilling successfullyThe text was updated successfully, but these errors were encountered: