2015-09-26 75 views
-1

我已經安裝了Cygwin編譯器,我試圖從Netbeans中運行一個C++ QT應用程序。C++編譯錯誤使用Qt和Cygwin的Netbeans

你可以從這個截圖中看到,我已經成功地建立了本地構建工具使用NetBeans:

enter image description here

不幸的是嘗試運行我的程序時,我得到以下錯誤:

make[2]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/QtApplication_1' 
nbproject/Makefile-Debug.mk:67: recipe for target '.build-conf' failed 
make[1]: *** [.build-conf] Error 2 
make[1]: Leaving directory '/cygdrive/c/Users/User/Documents/NetBeansProjects/QtApplication_1' 
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed 
make: *** [.build-impl] Error 2 

只是要清楚,我沒有運行一個複雜的程序,實際上,我只是試圖執行一個基本生成的主文件:

#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(); 
} 

我一直在這個問題上停留了一段時間,非常感謝你的幫助。

你可以下載我的Makefile-Debug和Makefile-impl here

+0

1.您是否能構建一個簡單的Hello World程序? 2.您可以向我們發送Makefile-Makefile-Debug.mk,它應該位於項目目錄中的某個位置嗎? –

+0

你好,我已經提供了上面的鏈接,爲了您的方便將鏈接到這裏:http://wikisend.com/download/348612/makefiles.zip - 回答你的問題,我不能運行簡單的你好世界程序 –

+0

對不起。但似乎無法與Qt和Cygwin合作。看看我的答案。 –

回答