gpt4 book ai didi

c++ - QTCreator g++.exe : fatal error: no input files (Windows)

转载 作者:太空宇宙 更新时间:2023-11-04 12:56:22 26 4
gpt4 key购买 nike

构建过程中出现错误:

代码 *.pro:

QT       += core gui

QT = widgets

TARGET = MYPROJECT
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

代码mainwindow.h:

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();

private:
Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H

作为兼容安装:C:\Strawberry\c\bin\g++.exe

程序集是在 Windows 10 64 位中制作的。

我及时得到这样的错误:

g++.exe: fatal error: no input files compilation terminated. 09:38:38: The process "C:\Strawberry\c\bin\g++.exe" ended with code 1. Error in assembling / installing the MYPROJECT project (set: MYPROJECT_DESCTOP) During the "Build" stage

我尝试在 .pro 文件中包含文件的完整路径,但没有帮助。

最佳答案

确保您的所有代码文件都在当前工作目录中,否则您必须在编译命令中包含它们的路径。

关于c++ - QTCreator g++.exe : fatal error: no input files (Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46483257/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com