Cmake找不到Glew(Ubuntu 22.04)
我正在尝试编译 https://github.com/ad044/lain-bootleg-bootleg-bootleg 在Ubuntu 22.04上,遇到了一个问题,即Cmake找不到glew
的某些组件。
我已经指向glew_library
和glew_include
,但我无法找到glew_libraries
的路径。我想知道这里的人是否知道该路径是什么,以便我可以将其包含在cmakelists.txt
文件中。
这是Cmake的输出:
-- Checking for module 'glew'
-- No package 'glew' found
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find GLEW (missing: GLEW_LIBRARIES) (found version "")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindGLEW.cmake:215 (find_package_handle_standard_args)
CMakeLists.txt:72 (find_package)
对于它的价值,我尝试了glew-utils
的开发版本,但它无法解决问题。
我需要什么设置为set(glew_libraries“ directory_here”)
?
I am attempting to compile https://github.com/ad044/lain-bootleg-bootleg on Ubuntu 22.04 and have run into an issue where CMake can't find some components of glew
.
I have pointed GLEW_LIBRARY
and GLEW_INCLUDE
already but I am unable to find the path for GLEW_LIBRARIES
. I was wondering if someone here knows what that path is so that I may include it in the CMakeLists.txt
file.
Here is CMake's output:
-- Checking for module 'glew'
-- No package 'glew' found
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find GLEW (missing: GLEW_LIBRARIES) (found version "")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindGLEW.cmake:215 (find_package_handle_standard_args)
CMakeLists.txt:72 (find_package)
For what it's worth, I have attempted the dev version of glew-utils
and it did not resolve the issue.
What do I need I set for set(GLEW_LIBRARIES "directory_here")
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在试图编译Valkka核心的同时遇到了这个问题,该核心尽管安装了它,但它也找不到Glew。我必须
sudo apt install freeglut3-dev
才能解决问题。我在自己的文件夹中使用了这个小的cmakelists.txt文件来调试问题:
然后,如果您运行
cmake cmakelists.txt
这将有助于您快速查看问题是否已解决,而不是运行大型项目的完整一个可能需要一些时间。对于后代:我发现与此问题相关的另一个错误说GLU需要OpenGL,但找不到。
I had this issue while trying to compile valkka-core which also could not find glew despite it being installed. I had to
sudo apt install freeglut3-dev
in order to resolve the issue.I used this small CMakeLists.txt file in its own folder to debug the issue:
Then if you run
cmake CMakeLists.txt
this will help you quickly see if the issue is resolved rather than running a big project's full one which could take some time.For posterity: the other error I found related to this issue said glu requires OpenGL but could not find it.