D:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in function _cgo_preinit_i nit': \\_\_\runtime\cgo/gcc_libinit_windows.c:40: undefined reference toimp___iob_func'
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in function x_cgo_notify_r untime_init_done': \\_\_\runtime\cgo/gcc_libinit_windows.c:105: undefined reference toimp_iob_func'
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in function _cgo_beginthre ad': \\_\_\runtime\cgo/gcc_libinit_windows.c:149: undefined reference toimp_iob_func'
d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000017.o: in function x_cgo_thread_s tart': \\_\_\runtime\cgo/gcc_util.c:18: undefined reference to_impiob_func'
collect2.exe: error: ld returned 1 exit status
Please make sure of the following things
alist
and not something else(such asDependencies
orOperational
).Alist Version / Alist 版本
v3.8.0
Driver used / 使用的存储驱动
PIkPak
Describe the bug / 问题描述
编译时产生如下错误: E:\project\alist>go build -ldflags="-w -s"
github.com/alist-org/alist/v3
D:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in function
_cgo_preinit_i nit': \\_\_\runtime\cgo/gcc_libinit_windows.c:40: undefined reference to
imp___iob_func' d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in functionx_cgo_notify_r untime_init_done': \\_\_\runtime\cgo/gcc_libinit_windows.c:105: undefined reference to
imp_iob_func' d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000016.o: in function_cgo_beginthre ad': \\_\_\runtime\cgo/gcc_libinit_windows.c:149: undefined reference to
imp_iob_func' d:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Swift\AppData\Local\Temp\go-link-3653606329\000017.o: in functionx_cgo_thread_s tart': \\_\_\runtime\cgo/gcc_util.c:18: undefined reference to
_impiob_func' collect2.exe: error: ld returned 1 exit statusReproduction / 复现链接
我的gcc的版本是:
golang的版本是:
Logs / 日志
No response