gpt4 book ai didi

macos - MAC : missing: ZLIB_INCLUDE_DIR && OPENGL_INCLUDE_DIR

转载 作者:行者123 更新时间:2023-12-02 05:22:52 24 4
gpt4 key购买 nike

Zlib 应该默认安装在所有 mac 上,我很确定。但是当我为 SFML 运行 cmake 时,出现以下错误:

The C compiler identification is Clang 4.1.0
The CXX compiler identification is Clang 4.1.0
Check for working C compiler using: Xcode
Check for working C compiler using: Xcode -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Xcode
Check for working CXX compiler using: Xcode -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Found OpenGL: /System/Library/Frameworks/OpenGL.framework
Found Freetype: /usr/X11R6/lib/libfreetype.dylib (found version "2.4.4")
Found GLEW: /Users/falconmick/Documents/SFML2 src/extlibs/libs-osx/lib/libGLEW.a
Found JPEG: /Users/falconmick/Documents/SFML2 src/extlibs/libs-osx/lib/libjpeg.a
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
Call Stack (most recent call first):
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/SFML/Graphics/CMakeLists.txt:85 (find_package)


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:
OPENGL_INCLUDE_DIR (ADVANCED)
used as include directory in directory /Users/falconmick/Documents/SFML2 src/src/SFML/Window

Configuring incomplete, errors occurred!

最佳答案

通过设置 ZLIB_INCLUDE_DIR 变量帮助 CMake 找到它。要么运行这个:

cmake -D ZLIB_INCLUDE_DIR=/path/to/zlib/include .

在您的构建目录中,或通过 GUI 进行设置。

关于macos - MAC : missing: ZLIB_INCLUDE_DIR && OPENGL_INCLUDE_DIR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13584619/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com