当我在我的Ubuntu机器上尝试构建中间件时,我运行以下命令:
$ make depend -f gcc.mak
我得到了以下错误信息:
/usr/include/../include/limits.h:125:26: 错误:无法搜索limits.h文件的包含路径
这是与limits.h: 125相关的内容:
/* Get the compiler's limits.h, which defines almost all the ISO constants.
We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ # include_next <limits.h> #endif
我尝试设置以下环境变量:
$ export INCLUDE=/usr/lib/gcc/x86_64-linux-gnu/4.3/include-fixed/ $ export C_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.3/include-fixed/ $ export CPLUS_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.3/include-fixed/
(那里我在系统上找到了另一个limits.h)。我已经安装了libc6-dev,可能它的limits.h已被另一个软件包覆盖了吗?我需要另一个-dev软件包吗?或者需要环境变量吗?也许可以用其他方法绕过这个问题?
export CPATH=$(env | grep _INC | cut -d= -f2 | paste -d: -s)
和export LIBRARY_PATH=$(env | grep _LIB | cut -d= -f2 | paste -d: -s)
。 - George