emscripten icon indicating copy to clipboard operation
emscripten copied to clipboard

Wrong path for SDL

Open brccabral opened this issue 10 months ago • 1 comments

Please include the following in your bug report:

Version of emscripten/emsdk:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.7-git (4af36cf80647f9a82be617a0ff32f3e56f220e41)
clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /mnt/HDExtra/bin/LLVM.d/bin

File system/lib/cmake/SDL2/sdl2-config.cmake has set(SDL2_INCLUDE_DIRS "${EMSCRIPTEN_SYSROOT}/include/SDL2"), but there is no directory SDL2, only emscripten/system/include/SDL

brccabral avatar Apr 12 '25 08:04 brccabral

That is the correct directory. If include/SDL2 is missing it is likely because the SDL2 port was not yet installed. The port can be installed explicitly using ./embuilder build sdl2 or implicitly by simply compiling something with -sUSE_SDL=2.

BTW emscripten/system/include is never referenced by the compiler. That directory contains headers that are installed into the sysroot, from where they get referenced.

sbc100 avatar Apr 14 '25 18:04 sbc100