Skip to content
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

Can't crosscompile from linux to windows #27

Open
encendre opened this issue Dec 24, 2020 · 2 comments
Open

Can't crosscompile from linux to windows #27

encendre opened this issue Dec 24, 2020 · 2 comments

Comments

@encendre
Copy link

Hi, i'm on linux and when i run the following command GOOS=windows go test -c in this repository i go these errors:

# github.com/robotn/gohook [github.com/robotn/gohook.test]
./hook_test.go:13:7: undefined: Start
./hook_test.go:18:7: undefined: RawcodetoKeychar
./hook_test.go:21:7: undefined: KeychartoRawcode

Same when i try to crosscompile my project with depend on gohook

@yu13n
Copy link

yu13n commented Nov 28, 2021

This is gcc environment's error. Install mingw-w64-gcc, and run CGO_ENABLED=1 GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ go build

@intmian
Copy link

intmian commented May 8, 2022

thx,it do work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants