无法建立带有CMake错误的GLFW [英] Unable to build GLFW with CMake errors
问题描述
我从其站点下载了最新的GLFW源(3.1.1),将其解压缩到桌面,并尝试使用 cmake
进行构建。弹出一些依赖项错误,但很快得到解决。直到我陷入困境:
I downloaded the latest GLFW source (3.1.1) from its site, uncompressed it to the desktop, and tried to build it with cmake
. Some dependency errors popped up, but was quickly fixed. Until I got stuck on this one:
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!
我完全不知道这意味着什么以及如何进行
I'm totally lost as to what this means, and how to proceed
我使用的是Ubuntu 14.04 64位,具有专有的AMD Radeon 7950驱动程序
I'm on Ubuntu 14.04 64 bit, with proprietary AMD Radeon 7950 drivers
推荐答案
一个错误输出中的正在查找glXGetProcAddressEXT-未找到
,并且日志文件表明libGL存在链接错误。
One of the error outputs was Looking for glXGetProcAddressEXT - not found
, and the log files indicated that there was a linking error with libGL.
然后我尝试运行 apt-get install glfw
以打印出依赖项列表。即使它是 apt-get
中的较旧版本,它仍然列出了一些必须安装的依赖项。
I then tried running apt-get install glfw
to print out the list of dependencies. Even though it was an older version in apt-get
, it still listed some dependencies that had to be installed.
GLFW在安装 libglu1-mesa-dev
和 libgl1-mesa-dev
最后一条错误消息 CMake错误:此项目中使用了以下变量,但是将它们设置为NOTFOUND。
是使我失望的一个。我以为这是路径和环境变量的问题
请设置它们或确保已在CMake文件中对其进行正确设置和测试:
OPENGL_glu_LIBRARY(高级)
The last error message 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)
was the one that threw me off. I thought it was a problem with paths and environment variables
这篇关于无法建立带有CMake错误的GLFW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!