carla icon indicating copy to clipboard operation
carla copied to clipboard

Could NOT find SDL2

Open Willis814 opened this issue 1 year ago • 8 comments

CARLA version:0.9.14 Platform/OS:Windows11 Problem I experienced: -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621. CMake Error at E:/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR SDL2_SDLMAIN_LIBRARY) Call Stack (most recent call first): E:/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) RecastDemo/cmake/FindSDL2.cmake:152 (find_package_handle_standard_args) RecastDemo/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!

-[install_recast]: [CMAKE ERROR] An error ocurred while executing the cmake.
-[install_recast]: [CMAKE ERROR] Possible causes:
-[install_recast]:                - Make sure "CMake" is installed.
-[install_recast]:                - Make sure it is available on your Windows "path".
-[install_recast]: Exiting with error...

-[Setup]: Ok, and error ocurred, don't panic! We have different platforms where you can find some help :)

  • Make sure you have read the documentation: http://carla.readthedocs.io/en/latest/how_to_build_on_windows/

  • If the problem persists, you can ask on our Github's "Building on Windows" issue: https://github.com/carla-simulator/carla/issues/21

  • Or just use our Discord channel! We'll be glad to help you there :) https://discord.gg/42KJdRj make: *** [setup] 错误 1 Do anyone faced the problem like me?

Willis814 avatar Oct 27 '23 07:10 Willis814

I encountered the same problem following the Build Carla on Windows guide. I fixed this by cloning Carla 0.9.14 with the following command instead of the one suggested:

git clone https://github.com/carla-simulator/carla -b 0.9.14 --depth 1

Hope it helps

Canio95 avatar Oct 31 '23 12:10 Canio95

Thank you for your help, but it seems that cmake still cannot find sdl2, even though I have installed sdl2.🥺

Willis814 avatar Nov 01 '23 06:11 Willis814

Have you already sovled it? I met this problem,too.

ppfei666 avatar Jan 25 '24 15:01 ppfei666

Have you already sovled it? I met this problem,too.

I have solved it. Maybe you should download the source file of SDL2 and compile it.

Willis814 avatar Jan 28 '24 04:01 Willis814

我已经解决了。也许您应该下载 SDL2 的源文件并对其进行编译。

How to compile it?

ppfei666 avatar Jan 28 '24 04:01 ppfei666

I have solved this question,go to this path and read "carla\Build\recast-src\RecastDemo\Contrib\readme-sdl.txt",you will know what to do, you need unzip your downloaded SDL in contrib as the .txt file says.

XiaoMing2336 avatar Feb 01 '24 12:02 XiaoMing2336

I have solved this question,go to this path and read "carla\Build\recast-src\RecastDemo\Contrib\readme-sdl.txt",you will know what to do, you need unzip your downloaded SDL in contrib as the .txt file says.

i'm sorry, which file in SDL should be download and where should it be placed 🥺

PierceG6 avatar Feb 02 '24 15:02 PierceG6

I have solved this question,go to this path and read "carla\Build\recast-src\RecastDemo\Contrib\readme-sdl.txt",you will know what to do, you need unzip your downloaded SDL in contrib as the .txt file says.

i'm sorry, which file in SDL should be download and where should it be placed 🥺

Firstly I download and unzip the SDL2-devel-2.30.0-VC.zip in "D:\carla\Build\recast-src\RecastDemo\Contrib",then I rename the unziped folder as "SDL",It really works for me.

XiaoMing2336 avatar Feb 03 '24 02:02 XiaoMing2336