C++ Can';t编译简单的c++;NetBeans中的QT应用程序示例

C++ Can';t编译简单的c++;NetBeans中的QT应用程序示例,c++,qt,netbeans,configuration,qmake,C++,Qt,Netbeans,Configuration,Qmake,我目前正在尝试使用QT x64(通过MSYS2安装)和MinGW在Netbeans中编译QT示例。但它就是不起作用 生成输出 cd 'C:\Users\Thomas\Documents\NetBeansProjects\HelloQtWorld_1' C:\developer\msys2-64\usr\bin\make.exe -f Makefile CONF=Debug QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe "/C/develope

我目前正在尝试使用QT x64(通过MSYS2安装)和MinGW在Netbeans中编译QT示例。但它就是不起作用

生成输出

cd 'C:\Users\Thomas\Documents\NetBeansProjects\HelloQtWorld_1'
C:\developer\msys2-64\usr\bin\make.exe -f Makefile CONF=Debug QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe
"/C/developer/msys2-64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe SUBPROJECTS= .build-conf
make[1]: Entering directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
/C/developer/msys2-64/mingw64/bin/qmake.exe VPATH=. -spec win32-g++ -o qttmp-Debug.mk nbproject/qt-Debug.pro
WARNING: Failure to find: build/Debug/MinGW-Windows/HelloQtWorld_1_resource_res.o
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/mv: missing file operand
Try '/usr/bin/mv --help' for more information.
make[1]: *** [nbproject/Makefile-Debug.mk:59: nbproject/qt-Debug.mk] Error 1
make[1]: Leaving directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

BUILD FAILED (exit value 2, total time: 659ms)
cd 'C:\Users\Thomas\Documents\NetBeansProjects\HelloQtWorld_1'
C:\developer\msys2-64\usr\bin\make.exe -f Makefile CONF=Debug clean QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe
"/C/developer/msys2-64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe SUBPROJECTS= .clean-conf
make[1]: Entering directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
/C/developer/msys2-64/mingw64/bin/qmake.exe VPATH=. -spec win32-g++ -o qttmp-Debug.mk nbproject/qt-Debug.pro
WARNING: Failure to find: build/Debug/MinGW-Windows/HelloQtWorld_1_resource_res.o
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/mv: missing file operand
Try '/usr/bin/mv --help' for more information.
make[1]: *** [nbproject/Makefile-Debug.mk:59: nbproject/qt-Debug.mk] Error 1
make: *** [nbproject/Makefile-impl.mk:46: .clean-impl] Error 2
make[1]: Leaving directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'

CLEAN FAILED (exit value 2, total time: 1s)
清洁和建造的输出

cd 'C:\Users\Thomas\Documents\NetBeansProjects\HelloQtWorld_1'
C:\developer\msys2-64\usr\bin\make.exe -f Makefile CONF=Debug QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe
"/C/developer/msys2-64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe SUBPROJECTS= .build-conf
make[1]: Entering directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
/C/developer/msys2-64/mingw64/bin/qmake.exe VPATH=. -spec win32-g++ -o qttmp-Debug.mk nbproject/qt-Debug.pro
WARNING: Failure to find: build/Debug/MinGW-Windows/HelloQtWorld_1_resource_res.o
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/mv: missing file operand
Try '/usr/bin/mv --help' for more information.
make[1]: *** [nbproject/Makefile-Debug.mk:59: nbproject/qt-Debug.mk] Error 1
make[1]: Leaving directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

BUILD FAILED (exit value 2, total time: 659ms)
cd 'C:\Users\Thomas\Documents\NetBeansProjects\HelloQtWorld_1'
C:\developer\msys2-64\usr\bin\make.exe -f Makefile CONF=Debug clean QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe
"/C/developer/msys2-64/usr/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE=/C/developer/msys2-64/mingw64/bin/qmake.exe SUBPROJECTS= .clean-conf
make[1]: Entering directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'
/C/developer/msys2-64/mingw64/bin/qmake.exe VPATH=. -spec win32-g++ -o qttmp-Debug.mk nbproject/qt-Debug.pro
WARNING: Failure to find: build/Debug/MinGW-Windows/HelloQtWorld_1_resource_res.o
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/mv: missing file operand
Try '/usr/bin/mv --help' for more information.
make[1]: *** [nbproject/Makefile-Debug.mk:59: nbproject/qt-Debug.mk] Error 1
make: *** [nbproject/Makefile-impl.mk:46: .clean-impl] Error 2
make[1]: Leaving directory '/c/Users/Thomas/Documents/NetBeansProjects/HelloQtWorld_1'

CLEAN FAILED (exit value 2, total time: 1s)
代码

#include <QApplication>

int main(int argc, char *argv[]) {
    // initialize resources, if needed
    // Q_INIT_RESOURCE(resfile);

    QApplication app(argc, argv);

    // create and show your widgets here

    return app.exec();
}
#包括
int main(int argc,char*argv[]){
//如果需要,初始化资源
//Q_INIT_资源(resfile);
QApplication应用程序(argc、argv);
//在此处创建并显示您的小部件
返回app.exec();
}
我认为QMake和g++还可以,因为我可以在命令行中使用它们,但是我没有cmake,但我认为这并不重要。 如果你需要其他信息,告诉我,因为我真的想在NETBeCes上编码C++。
另外,我对QT编译和功能也有点不在行。

IMO Creator是一个更好的IDE。@dtech什么是IMO Creator,我甚至没有在web上找到它。但是我使用netbeans是因为它是开源的,可以支持我使用的大多数语言。IMO=在我看来,Creator是Qt Creator-原生Qt开发IDE。啊,好吧,对不起,我不是英语^^。嗯,我现在正在使用它,因为我没有解决我的问题,我更喜欢NetBeans
HelloQtWorld
sample对我来说没问题。。。但是它有点不同,
newmain.cpp
包含
HelloForm
,构建命令对资源文件没有任何作用。但是:它是Linux和Netbeans 8.2。你有什么版本的NetBeans?