我正在为 renderdoc 使用 CMake GUI,我收到了这些消息。我应该如何修复它们?
The C compiler identification is MSVC 19.0.24215.1
Check for working C compiler: D:/VS15/VC/bin/x86_amd64/cl.exe
Check for working C compiler: D:/VS15/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Configuring done
最佳答案
您没有说明 CMake 命令是什么,但看起来您正在为 Visual Studio 构建进行配置。它似乎也有效,它只是告诉您它在系统上找到了什么和没有找到什么,这是任何配置过程(autotools 或 CMake)的正常部分。
Visual C++ 不提供 unistd.h
,您可能需要包含其他 header ,但这取决于您的需要。至于 off64_t
,那是一个 POSIX 类型,同样,它不是由编译器提供的。
您的代码是否真的需要这些 header 或类型,或者它会编译吗?如果代码不使用 header 或类型,那么即使在配置时找不到它们也没关系。
如果失败,您要么需要提供您自己的所需实现,修改源代码以使其更具可移植性,要么切换到 GCC 和 mingw 或提供这些东西的其他工具链。
关于c - 在 Win10 的 CMake 中找不到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41154950/