gpt4 book ai didi

c - 无法使用 CMake 错误构建 GLFW

转载 作者:太空宇宙 更新时间:2023-11-04 03:37:52 25 4
gpt4 key购买 nike

我从它的站点下载了最新的 GLFW 源代码 (3.1.1),将其解压缩到桌面,并尝试使用 cmake 构建它。弹出了一些依赖性错误,但很快就修复了。直到我卡在这个问题上:

alex@alex-AMD:~/Desktop/glfw-3.1.1$ cmake .
-- The C compiler identification is Clang 3.6.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/libGL.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6")
-- Using X11 for window creation
-- Using GLX for context creation
-- Looking for glXGetProcAddress
-- Looking for glXGetProcAddress - found
-- Looking for glXGetProcAddressARB
-- Looking for glXGetProcAddressARB - found
-- Looking for glXGetProcAddressEXT
-- Looking for glXGetProcAddressEXT - not found
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_glu_LIBRARY (ADVANCED)
linked by target "boing" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "gears" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "heightmap" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "particles" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "simple" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "splitview" in directory /home/alex/Desktop/glfw-3.1.1/examples
linked by target "wave" in directory /home/alex/Desktop/glfw-3.1.1/examples

-- Configuring incomplete, errors occurred!

我完全不知道这意味着什么,以及如何进行

我在 Ubuntu 14.04 64 位上,使用专有的 AMD Radeon 7950 驱动程序

最佳答案

其中一个错误输出是Looking for glXGetProcAddressEXT - not found,并且日志文件表明存在与 libGL 的链接错误。

然后我尝试运行 apt-get install glfw 来打印依赖项列表。尽管它是 apt-get 中的旧版本,它仍然列出了一些必须安装的依赖项。

安装 libglu1-mesa-devlibgl1-mesa-dev 后编译的 GLFW

最后一条报错信息 CMake Error: 本项目中使用了以下变量,但它们被设置为 NOTFOUND。
请设置它们或确保在 CMake 文件中正确设置和测试它们:
OPENGL_glu_LIBRARY (ADVANCED)
是让我失望的那个。我以为是路径和环境变量的问题

关于c - 无法使用 CMake 错误构建 GLFW,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30793219/

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