Cmake找不到Glew(Ubuntu 22.04)

发布于 2025-02-02 11:01:36 字数 1062 浏览 3 评论 0原文

我正在尝试编译 https://github.com/ad044/lain-bootleg-bootleg-bootleg 在Ubuntu 22.04上,遇到了一个问题,即Cmake找不到glew的某些组件。

我已经指向glew_libraryglew_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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

当爱已成负担 2025-02-09 11:01:36

我在试图编译Valkka核心的同时遇到了这个问题,该核心尽管安装了它,但它也找不到Glew。我必须sudo apt install freeglut3-dev才能解决问题。

我在自己的文件夹中使用了这个小的cmakelists.txt文件来调试问题:

cmake_minimum_required(VERSION 3.13)
find_package(PkgConfig)
pkg_check_modules(GLEW glew)
find_package(GLEW REQUIRED)

然后,如果您运行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:

cmake_minimum_required(VERSION 3.13)
find_package(PkgConfig)
pkg_check_modules(GLEW glew)
find_package(GLEW REQUIRED)

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文