我从其网站下载了最新的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驱动程序
答案 0 :(得分:1)
其中一个错误输出是Looking for glXGetProcAddressEXT - not found
,日志文件表明libGL存在链接错误。
然后我尝试运行apt-get install glfw
来打印出依赖项列表。即使它是apt-get
中的旧版本,它仍然列出了一些必须安装的依赖项。
安装libglu1-mesa-dev
和libgl1-mesa-dev
最后一条错误消息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)
是让我失意的消息。我认为这是路径和环境变量的问题