Skip to main content
Associate
July 5, 2025
Question

SDL2/SDL_render.h: No such file or directory

  • July 5, 2025
  • 2 replies
  • 458 views

我在使用cubeide时一直报错,下面是详细的报错信息:
Description Resource Path Location Type
fatal error: SDL2/SDL_render.h: No such file or directory HALSDL2.hpp /llwstm32/Middlewares/ST/touchgfx/framework/include/platform/hal/simulator/sdl2 line 26 C/C++ Problem
make: *** [Middlewares/ST/touchgfx/framework/source/platform/driver/touch/subdir.mk:19: Middlewares/ST/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.o] Error 1 llwstm32 C/C++ Problem
make: *** Waiting for unfinished jobs.... llwstm32 C/C++ Problem
'destroy' defined but not used [-Wunused-function] genx320.c /llwstm32/Drivers/product-genx-ctrl/src line 188 C/C++ Problem
Project 'llwstm32' has no explicit encoding set llwstm32 /llwstm32 No explicit project encoding
Project 'product-genx-ctrl' has no explicit encoding set product-genx-ctrl /product-genx-ctrl No explicit project encoding

路径都添加了,不知道是什么原因引起的,使用的是STM32F7146G-DISCO

2 replies

TDK
Super User
July 5, 2025

Look for the files. Do they exist? If so, are the include directories set up so it find them? Show evidence of this.

Unclear if it can't find SDL2/SDL_render.h or HALSDL2.hpp.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate
July 5, 2025

Cherry_0-1751723902050.pngCherry_1-1751723913256.png

是的,SDL2/SDL_render.h 位于路径 D:\32\llwstm32\Middlewares\ST\touchgfx\framework\include\platform\hal\simulator\sdl2\vendor\SDL2 下,HALSDL2.hpp 位于路径 D:\32\llwstm32\Middlewares\ST\touchgfx\framework\include\platform\hal\simulator\sdl2 下。

GaetanGodart
Technical Moderator
July 7, 2025

Hello @Cherry猫猫 ,

 

What is your hardware? What are your software and versions?

Are the files located where the includes are pointing?

 

Regards,