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

windows下使用报错 #9

Closed
wangyiran125 opened this issue Dec 29, 2019 · 2 comments
Closed

windows下使用报错 #9

wangyiran125 opened this issue Dec 29, 2019 · 2 comments

Comments

@wangyiran125
Copy link

make-clib-static 文件夹
在windows Cygwin64 Terminal执行make命令报错

$ make
go build -buildmode=c-archive -o number.a

runtime/cgo

gcc_libinit_windows.c: 在函数‘x_cgo_sys_thread_create’中:
gcc_libinit_windows.c:57:12: 错误:implicit declaration of function ‘_beginthread’; did you mean ‘OpenThread’? [-Werror=implicit-function-declaration]
thandle = _beginthread(func, 0, arg);
^~~~~~~~~~~~
OpenThread
cc1:所有的警告都被当作是错误
go: failed to remove work dir: GetFileInformationByHandle D:\cygwin64new\tmp\go-build109746670\NUL: Incorrect function.
make: *** [Makefile:5:default] 错误 2

@chai2010
Copy link
Owner

之前是在 mingw(tdm-gcc)环境测试的。Cygwin64环境需要换成相应的函数名字

@wangyiran125
Copy link
Author

我改成tdm-gcc通过了,谢谢!

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

2 participants