这是我试图运行代码:LD返回1退出状态
#include <QApplication>
#include <QPushButton>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
return app.exec();
}
这是我得到的错误:
:-1: error: collect2: ld returned 1 exit status
这是我试图运行代码:LD返回1退出状态
#include <QApplication>
#include <QPushButton>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
return app.exec();
}
这是我得到的错误:
:-1: error: collect2: ld returned 1 exit status
如果您仔细阅读错误消息,您将看到问题。
... ld.exe:无法打开输出文件...
链接器试图写入生成的可执行文件(debug.exe
)到磁盘上,但不允许(Permission denied
) 。这主要是由于您构建的应用程序当前正在运行。
关闭它并重建应用程序。
您必须在重建应用程序之前关闭应用程序。
如果磁盘空间不足,也会发生这种情况。