【问题标题】:not found in CMake in Win10在 Win10 的 CMake 中找不到
【发布时间】:2016-12-15 01:25:39
【问题描述】:

我正在为 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

【问题讨论】:

    标签: c cmake fseek cmake-gui unistd.h


    【解决方案1】:

    您没有说 CMake 命令是什么,但看起来您正在为 Visual Studio 构建进行配置。它似乎也有效,它只是告诉你它在系统上做了什么,没有找到什么,这是任何配置过程(自动工具或 CMake)的正常部分。

    Visual C++ 不提供unistd.h,您可能需要包含其他头文件,但这取决于您的需要。至于off64_t,这是一个POSIX类型,同样不是编译器提供的。

    您的代码是否真的需要这些标头或类型,或者它无论如何都会编译?如果代码不使用标头或类型,那么在配置时找不到它们也没关系。

    如果失败,您需要提供自己的所需实现,修改源代码以使其更便携,或者切换到 GCC 和 mingw 或其他提供这些东西的工具链。

    【讨论】:

      猜你喜欢
      • 2020-07-30
      • 1970-01-01
      • 2015-09-19
      • 2012-10-24
      • 2017-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-19
      相关资源
      最近更新 更多