go环境:go.1.2.windows-amd64
mingw安装是32位。
在用go调C相关的时候,编译报cc1.exe: sorry, unimplemented: 64-bit mode not compiled in.网上查了大部分资料说,需要将mingw32换成mingw64.
You are using 64-bit version of Go. You must use 64-bit gcc compiler.
Which MinGW GCC did you install? From where? Maybe check out:
http://mingw-w64.sourceforge.net/
本文解决在使用Go 1.2版本调用C语言代码时遇到的编译错误问题,主要原因是Go为64位版本而使用的MinGW为32位导致。文中提供了更换为64位MinGW的解决办法,并推荐了几种常用的64位MinGW资源。
856

被折叠的 条评论
为什么被折叠?



