G ++不清楚编译失败

时间:2014-07-31 06:00:35

标签: c++ gcc compilation makefile g++

大家好日子。这是我关于stackoverflow的第一个问题。我用谷歌搜索并将这件事砸死,但没有一击。我试图在Mint 17上用g ++编译一个c ++库。我得到一个令人沮丧的不明确的失败消息。我想知道以前是否有人遇到过此事。我意识到它看起来像一个缺失的包含,奇怪的是指出的位置是失败点和缺乏信息。通常,编译器指定它找不到的文件。请参阅以下信息。任何建议将不胜感激。

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/bfvanrooyen/Projects/Management Console/Event Monitor'
cd ../Perlingo\ Library && /usr/bin/make  -f Makefile CONF=Debug
make[2]: Entering directory `/home/bfvanrooyen/Projects/Management Console/Perlingo Library'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[3]: Entering directory `/home/bfvanrooyen/Projects/Management Console/Perlingo Library'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/libbham_dev.so
make[4]: Entering directory `/home/bfvanrooyen/Projects/Management Console/Perlingo Library'
mkdir -p build/Debug/GNU-Linux-x86/src
rm -f "build/Debug/GNU-Linux-x86/src/BhamEvent.o.d"
g++ -m32   -c -g -Wall -Iinclude -Isrc -I../Perlingo\ Shared\ Objects -include include -fPIC  -MMD -MP -MF "build/Debug/GNU-Linux-x86/src/BhamEvent.o.d" -o build/Debug/GNU-Linux-x86/src/BhamEvent.o src/BhamEvent.cpp
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:59:1: fatal error: include: No such file or directory
 #endif
 ^
compilation terminated.

2 个答案:

答案 0 :(得分:5)

您的选项-include include告诉g++包含名为“include”的文件。根据{{​​1}}找不到所述文件,因此错误。您确定g++不仅仅是副本&amp;粘贴某种错误?

如果对所有这些标记和参数都有疑问,您可以在-include include文档here中找到一个完整的列表。

答案 1 :(得分:-1)

我使用NetBeans使用g ++构建了一个非常类似的错误。在项目属性中,我需要在../Shared_files中共享头文件的目录。但是,我不小心把../Shared_files放在了属性&#34; Include Headers&#34;而不是&#34;包含目录&#34;