【问题标题】:Cmake Error: The following variables are used in the project, but they are set to NOTFOUND trying to compile Rigs of Rods in archlinuxCmake 错误:项目中使用了以下变量,但它们设置为 NOTFOUND 试图在 archlinux 中编译 Rigs of Rods
【发布时间】:2015-12-03 02:33:51
【问题描述】:

我一直在尝试用 4.2.6 内核在 archlinux 下编译 Rigs of Rods。 我已按照http://www.rigsofrods.com/wiki/pages/Compiling_Sources_under_Linux 中提供的官方编译说明进行操作 我已经成功编译了 ogredeps 并且 CMake 没有给我任何错误,我什至为它启用了多线程(在使用 make 时,在运行 CMake 之后),但是当我尝试编译 Ogre 时(在编译说明中的“Ogre Itself”部分下提到)CMake给我这个:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OIS_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples
   used as include directory in directory /root/ror-deps/ogre/Samples

这里也是 /root/ror-deps/ogre/CMakeFiles/CMakeError.log 的输出:

Determining if the system is big endian passed with the following output:
Change Dir: /root/ror-deps/ogre/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4b356/fast"
/usr/bin/make -f CMakeFiles/cmTC_4b356.dir/build.make CMakeFiles/cmTC_4b356.dir/build
make[1]: se entra en el directorio '/root/ror-deps/ogre/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4b356.dir/TestEndianess.c.o
/usr/bin/cc     -o CMakeFiles/cmTC_4b356.dir/TestEndianess.c.o   -c /root/ror-deps/ogre/CMakeFiles/CMakeTmp/TestEndianess.c
Linking C executable cmTC_4b356
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4b356.dir/link.txt  --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_4b356.dir/TestEndianess.c.o  -o cmTC_4b356 -rdynamic 
 make[1]: se sale del directorio '/root/ror-deps/ogre/CMakeFiles/CMakeTmp'

TestEndianess.c:
/* A 16 bit integer is required. */
typedef unsigned short cmakeint16;

/* On a little endian machine, these 16bit ints will give "THIS IS LITTLE ENDIAN."
   On a big endian machine the characters will be exchanged pairwise. */
 const cmakeint16 info_little[] =  {0x4854, 0x5349, 0x4920, 0x2053, 0x494c, 0x5454, 0x454c, 0x4520, 0x444e, 0x4149, 0x2e4e, 0x0000};

/* on a big endian machine, these 16bit ints will give "THIS IS BIG ENDIAN."
   On a little endian machine the characters will be exchanged pairwise. */
const cmakeint16 info_big[] =     {0x5448, 0x4953, 0x2049, 0x5320, 0x4249, 0x4720, 0x454e, 0x4449, 0x414e, 0x2e2e, 0x0000};

#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
  int require = 0;
  require += info_little[argc];
  require += info_big[argc];
  (void)argv;
  return require;
}

我研究过,我看过这些问题:

-CMake Error: The following variables are used in this project, but they are set to NOTFOUND -CMake Error: The following variables are used in this project, but they are set to NOTFOUND -CMake Error: The following variables are used in this project, but they are set to NOTFOUND ? in ros

但要么他们提到不同的问题,要么我无法很好地理解答案

【问题讨论】:

  • OIS_INCLUDE_DIR 表示未找到 OIS 的包含(头文件)。您的发行版有一个必须安装的软件包,或者您必须将 OIS 安装目录添加到 CMAKE_PREFIX_PATH。
  • 谢谢,我删除并重新安装了ois(面向对象的输入系统),现在我可以使用cmake生成makefile了,但是我卡在make;如果我使用 make 或 mke -j4 启用多线程,它会给我这个:

标签: c++ linux compilation cmake archlinux


【解决方案1】:

OIS_INCLUDE_DIR 表示未找到 OIS 的包含(头文件)。您的发行版有一个必须安装的软件包,或者您必须将 OIS 安装目录添加到 CMAKE_PREFIX_PATH。

【讨论】:

  • 谢谢,我已经下载并编译了 OIS,现在我可以使用 CMake,但是我卡在 make 上,但是,我会针对这个问题提出一个新问题
猜你喜欢
  • 2012-05-29
  • 1970-01-01
  • 1970-01-01
  • 2018-03-16
  • 2023-02-10
  • 2018-06-05
相关资源
最近更新 更多