2016-12-08 50 views
0

所以我是C++的初學者,只是遇到了這個錯誤信息,Clean變得成功,並且無論出於何種原因,構建都失敗了,沒有出現紅色。在這種情況下我不知道該怎麼做。我已經檢查過我的庫和路徑,它們都很好,顯示的行並沒有什麼意義,因爲所有行都是空白的。任何人都可以幫我弄清楚出了什麼問題嗎?C++清理成功,生成失敗,目錄缺失?

cd 'Z:\NetBeansProjects\Zahldarstellung2' 
C:\msys\bin\make.exe -f Makefile CONF=Debug clean 
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf 
make.exe[1]: Entering directory `/z/NetBeansProjects/Zahldarstellung2' 
rm -f -r build/Debug 
rm -f dist/Debug/MinGW-Windows/zahldarstellung2.exe 
make.exe[1]: Leaving directory `/z/NetBeansProjects/Zahldarstellung2' 

CLEAN SUCCESSFUL (total time: 450ms) 
cd 'Z:\NetBeansProjects\Zahldarstellung2' 
C:\msys\bin\make.exe -f Makefile CONF=Debug 
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf 
make.exe[1]: Entering directory `/z/NetBeansProjects/Zahldarstellung2' 
"/C/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/zahldarstellung2.exe 
make.exe[2]: Entering directory `/z/NetBeansProjects/Zahldarstellung2' 
mkdir -p build/Debug/MinGW-Windows 
rm -f "build/Debug/MinGW-Windows/GanzeZahl.o.d" 
g++ -c -g -include . -MMD -MP -MF "build/Debug/MinGW-Windows/GanzeZahl.o.d" -o build/Debug/MinGW-Windows/GanzeZahl.o GanzeZahl.cpp 
cc1plus.exe: fatal error: .: No such file or directory 
compilation terminated. 
nbproject/Makefile-Debug.mk:67: recipe for target `build/Debug/MinGW-Windows/GanzeZahl.o' failed 
make.exe[2]: *** [build/Debug/MinGW-Windows/GanzeZahl.o] Error 1 
make.exe[2]: Leaving directory `/z/NetBeansProjects/Zahldarstellung2' 
nbproject/Makefile-Debug.mk:60: recipe for target `.build-conf' failed 
make.exe[1]: *** [.build-conf] Error 2 
make.exe[1]: Leaving directory `/z/NetBeansProjects/Zahldarstellung2' 
nbproject/Makefile-impl.mk:39: recipe for target `.build-impl' failed 
make.exe": *** [.build-impl] Error 2 

BUILD FAILED (exit value 2, total time: 654ms) 

欣賞一些幫助 電賀

+0

看起來問題是'-include。' – drescherjm

回答

1

-include選項是用來作爲一種包括特定的文件到當前的源文件。使用例如-include somefile.h與源文件頂部的#include "somefile.h"相同。

這裏的問題是你試圖包含一個完整的目錄,而不是一個文件。這是無效的。

你真正想要的是-I選項增加了一個路徑到的路徑列表搜索系統頭文件。

+0

非常感謝!我的隊友說我們可以只包含一個目錄,不知道這是行不通的。猜猜這會對未來有所幫助 – szynima