go系列&运维系列&Windows系列:cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in




cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

前言

Windows环境下使用Go处理Ethereum项目时遇到64位模式不支持的错误,原因是安装的MinGW32位版本。解决方案是下载并安装64位MinGW-W64,更新系统环境变量,确保GCC编译器PATH路径中。完成这些步骤后,重新执行Go编译和测试,问题应当得到解决。

问题

使用go语言处理ethereum项目,在windows环境下执行测试程序时,报错

# runtime/cgo
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
FAIL command-line-arguments [build failed]
FAIL

解决办法

分析错误日志,显示64位模式不支持。那么在windows上安装的是mingw编译器,查看mingw发现确实是32位的

在这里插入图片描述
所以需要从MinGW官网上下载安装64位版本,进入其官网下载页https://www.mingw-w64.org/downloads/,发现有很多不同的版本。

在这里插入图片描述

选择MingW-W64-builds版本,下载后进入安装流程,选择x86_64后,下一步继续安装

配置windows环境变量,将安装MinGWbin目录添加到系统环境变量PATH中。

如未安装,可能会报错,如下为一个例子

# runtime/cgo
cgo: C compiler “gcc” not found: exec: “gcc”: executable file not found in %PATH%
FAIL command-line-arguments [build failed]
FAIL

完成安装以及环境变量配置后,执行go编译运行应该就没有问题了。







togolife

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

posted @   坦笑&&life  阅读(114)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示