andeya / pholcus

Pholcus is a distributed high-concurrency crawler software written in pure golang
Apache License 2.0
7.57k stars 1.71k forks source link

windwos 编译出错 #124

Open centaur679 opened 4 years ago

centaur679 commented 4 years ago

E:\github_source\spider>go build

github.com/Mirror-l/spider

D:\applications\go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 D:/applications/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `C:\Users\TANGZU~1\AppData\Local\Temp\go-link-952364683\000000.o' is incompatible with i386:x86-64 output collect2.exe: error: ld returned 1 exit status

andeya commented 4 years ago

应该是gcc版本不兼容,解决办法是多尝试几个gcc版本或者注释掉gui模块

yqchilde commented 4 years ago

作者您好,我有同样的问题,我已经试过TMD-GCC,MinGW8.1.0, 7.3.0, 7.1.0等多个版本了,问题还是存在。

yqchilde commented 4 years ago

我希望看日志,所以需要build

zgtxxxx commented 3 years ago

我也遇到这个问题了,C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 E:/tools/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `C:\Users\ADMINI~1\AppData\Local\Temp\go-link-092415567\000000.o' is incompatible with i386:x86-64 output collect2.exe: error: ld returned 1 exit status 编译不过去。

GhostHallyz commented 2 years ago

提供一种解决方式: 安装 rsrc 工具 go get github.com/akavel/rsrc 进入gui目录,重新生成syso文件 win32(x86): rsrc -arch 386 -manifest main.exe.manifest win64(x64): rsrc -arch amd64 -manifest ./guimain.manifest