Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: 'SDL2/SDL.h' file not found #1

Open
modi12jin opened this issue Aug 25, 2024 · 5 comments
Open

fatal error: 'SDL2/SDL.h' file not found #1

modi12jin opened this issue Aug 25, 2024 · 5 comments

Comments

@modi12jin
Copy link

make: make -j4
[ 30%] Built target lvgl
[ 30%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl_common.c.o
[ 30%] Building C object lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl.c.o
[ 40%] Built target lvgl_demos
[ 69%] Built target lvgl_examples
In file included from /home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl.c:50:
/home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl_common_internal.h:21:10: fatal error: 'SDL2/SDL.h' file not found
#include SDL_INCLUDE_PATH 
         ^~~~~~~~~~~~~~~~
/home/jin/文档/lvgl-template-web/lv_drv_conf.h:92:29: note: expanded from macro 'SDL_INCLUDE_PATH'
#define SDL_INCLUDE_PATH    <SDL2/SDL.h>    /*Eclipse: <SDL2/SDL.h>    Visual Studio: <SDL.h>*/
                            ^~~~~~~~~~~~
<scratch space>:56:1: note: expanded from here
<SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
emcc: error: '/usr/bin/clang-13 -target wasm32-unknown-emscripten -DEMSCRIPTEN -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=5 -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D_LIBCPP_ABI_VERSION=2 -fno-threadsafe-statics -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/usr/share/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -I/home/jin/文档/lvgl-template-web -isystem /home/jin/文档/lvgl-template-web/lv_drivers -isystem /home/jin/文档/lvgl-template-web/lvgl -MD -MT lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl.c.o -MF CMakeFiles/lv_drivers.dir/sdl/sdl.c.o.d -c /home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl.c -o CMakeFiles/lv_drivers.dir/sdl/sdl.c.o' failed (returned 1)
In file included from /home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl_common.c:8:
/home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl_common_internal.h:21:10: fatal error: 'SDL2/SDL.h' file not found
#include SDL_INCLUDE_PATH 
         ^~~~~~~~~~~~~~~~
/home/jin/文档/lvgl-template-web/lv_drv_conf.h:92:29: note: expanded from macro 'SDL_INCLUDE_PATH'
#define SDL_INCLUDE_PATH    <SDL2/SDL.h>    /*Eclipse: <SDL2/SDL.h>    Visual Studio: <SDL.h>*/
                            ^~~~~~~~~~~~
<scratch space>:56:1: note: expanded from here
<SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
make[2]: *** [lv_drivers/CMakeFiles/lv_drivers.dir/build.make:317:lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl.c.o] 错误 1
make[2]: *** 正在等待未完成的任务....
emcc: error: '/usr/bin/clang-13 -target wasm32-unknown-emscripten -DEMSCRIPTEN -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=5 -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D_LIBCPP_ABI_VERSION=2 -fno-threadsafe-statics -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/usr/share/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -I/home/jin/文档/lvgl-template-web -isystem /home/jin/文档/lvgl-template-web/lv_drivers -isystem /home/jin/文档/lvgl-template-web/lvgl -MD -MT lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl_common.c.o -MF CMakeFiles/lv_drivers.dir/sdl/sdl_common.c.o.d -c /home/jin/文档/lvgl-template-web/lv_drivers/sdl/sdl_common.c -o CMakeFiles/lv_drivers.dir/sdl/sdl_common.c.o' failed (returned 1)
make[2]: *** [lv_drivers/CMakeFiles/lv_drivers.dir/build.make:332:lv_drivers/CMakeFiles/lv_drivers.dir/sdl/sdl_common.c.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:227:lv_drivers/CMakeFiles/lv_drivers.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2
emmake: error: 'make -j4' failed (returned 2)

When I run the "emmake make -j4" command, I get an error "Cannot find SDL"

My computer is Ubuntu 22.04 and SDL2 has been installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@modi12jin and others