举报

用CMAKE 加 VSCODE 构建编译报错。问题出在哪里,该怎么解决

0

[build] D:/Programs/Microsoft VS Code/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/vscode/lib/libeasyx.a(EasyX.GraphWnd.o):EasyX.GraphWnd.cpp:(.text+0x198c): undefined reference to `__imp___iob_func'
[build] collect2.exe: error: ld returned 1 exit status

这是报错信息。

#include <iostream>
#include <easyx.h>
#include <graphics.h>
#include <conio.h>
//#include <stdio.h>

using namespace std;

int main()
{
    cout<<"123"<<endl;

initgraph(1024,768);

    system("pause");
closegraph();
    return 0;

}

 

ava

2024-12-27

举报
0

像是和当前的 mingw 版本不兼容。试试换一个别的版本的 mingw 试试。

ava
慢羊羊

2025-1-9

技术讨论社区