举报

MinGW14.2 undefined reference to `__imp___iob_func'

0

win10,MinGW14.2编译。

最近升级了编译器,发现用新的编译器编译EasyX程序不通过

编译指令:

-O2
-std=c++11
-I"C:\mingw64\include"
-I"C:\mingw64\x86_64-w64-mingw32\include"
-I"C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include"
-I"C:\mingw64\lib\gcc\x86_64-w64-mingw32\14.2.0\include\c++"
-L"C:\mingw64\lib"
-L"C:\mingw64\x86_64-w64-mingw32\lib"
-static-libgcc

错误:

C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\mingw64\x86_64-w64-mingw32\lib/libeasyx.a(EasyX.GraphWnd.o):EasyX.GraphWnd.cpp:(.text+0x198c): undefined reference to `__imp___iob_func'
collect2.exe: error: ld returned 1 exit status
ava
zhouhaoGG

2025-3-8

举报
0

mingw 版本不对,更换一个试试

参考:https://codebus.cn/bestans/easyx-for-mingw

MinGW-w64 的版本繁多,支持有限。例如对于 MinGW-w64 8.1.0 版本,easyx4mingw 支持 x86_64-posix-seh、x86_64-win32-seh、i686-posix-sjlj、i686-win32-sjlj,但不支持 x86_64-posix-sjlj、x86_64-win32-sjlj、i686-posix-dwarf、i686-win32-dwarf。

ava
xiongfj ◑◑

2025-3-9

技术讨论社区