我正在尝试构建inviwo:https://github.com/inviwo/inviwo
使用CMake。我已经撤回了仓库,并使用了CMake,以便它没有错误并生成了一个Makefile,该文件由make
运行。我收到大量错误,指出找不到stddef.h:
Warning: include-what-you-use reported diagnostics:
In file included from /home/sahandz/inviwo-output/src/qt/editor/__/__/__/include/inviwo/qt/editor/linkdialog/moc_linkdialogprocessorgraphicsitems.cpp:9:
In file included from /home/sahandz/inviwo-output/src/qt/editor/__/__/__/include/inviwo/qt/editor/linkdialog/../../../../../../../../../../../../inviwo/include/inviwo/qt/editor/linkdialog/linkdialogprocessorgraphicsitems.h:37:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QGraphicsView:1:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qgraphicsview.h:43:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qtwidgetsglobal.h:43:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qtguiglobal.h:43:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:46:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/cstddef:50:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
或
Warning: include-what-you-use reported diagnostics:
In file included from /home/sahandz/inviwo/apps/inviwo/inviwo.cpp:32:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QFile:1:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qfile.h:44:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qfiledevice.h:43:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qiodevice.h:43:
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:46:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/cstddef:50:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
。
我对C和makefile完全陌生,所以我不确定该怎么做,也无法通过谷歌搜索找到任何有用的东西。为什么会出现这些错误?
其他信息:
编写一个简单的文件main.cpp:
#include <cstddef>
int main()
{
return 0;
}
并使用gcc -H main.cpp -o main
进行编译不会出现问题:
. /usr/include/c++/7/cstddef
.. /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h
... /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h
.... /usr/include/features.h
..... /usr/include/x86_64-linux-gnu/sys/cdefs.h
...... /usr/include/x86_64-linux-gnu/bits/wordsize.h
...... /usr/include/x86_64-linux-gnu/bits/long-double.h
..... /usr/include/x86_64-linux-gnu/gnu/stubs.h
...... /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
... /usr/include/x86_64-linux-gnu/c++/7/bits/cpu_defines.h
.. /usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h
Multiple include guards may be useful for:
/usr/include/x86_64-linux-gnu/bits/long-double.h
/usr/include/x86_64-linux-gnu/bits/wordsize.h
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h
/usr/include/x86_64-linux-gnu/gnu/stubs.h
/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h