Make Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.16/Modules/FindSDL.cmake:188 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) navigation-noetic-devel/map_server/CMakeLists.txt:12 (find_package) -- Configuring incomplete, errors occurred! See also "/home/a728689213/new_workspace/build/CMakeFiles/CMakeOutput.log". See also "/home/a728689213/new_workspace/build/CMakeFiles/CMakeError.log". make: *** [Makefile:320: cmake_check_build_system] Error 1
时间: 2023-07-29 09:09:03 浏览: 374
cmake-findsdl-libs
这个错误是因为 CMake 找不到 SDL 库,可能是因为你的系统没有安装 SDL 库,或者 CMake 没有正确配置 SDL 库的路径。你可以尝试使用包管理器安装 SDL 库,比如在 Ubuntu 上,你可以使用以下命令安装:
```
sudo apt-get install libsdl2-dev
```
如果已经安装了 SDL 库,你可以查看一下 CMakeLists.txt 中关于 SDL 库的配置是否正确,比如确保已经设置了 SDL_LIBRARY 和 SDL_INCLUDE_DIR 变量的值。
阅读全文