codeblocks编译找不到SDL2/SDL.h SDL.h SDL_image.h

下载

https://github.com/libsdl-org/SDL/releases/
https://github.com/libsdl-org/SDL_image/releases


1. 解压

将SDL2_image-devel-2.6.3-mingw.zip里面x86_64-w64-mingw32的lib、bin、include对应文件
解压到SDL2-devel-2.28.2-mingw.zip\SDL2-2.28.2\x86_64-w64-mingw32\lib、bin、include对应文件夹里面。

2. 配置codeblocks

Build options -> Linker settings -> Other linker options: -lmingw32 -lSDL2 -lSDL2main -lSDL2_image

添加SDL2位置
Search directories -> Compiler: 
D:\Lvgl\SDL2-devel-2.28.2-mingw\SDL2-2.28.2\x86_64-w64-mingw32\include\SDL2
D:\Lvgl\SDL2-devel-2.28.2-mingw\SDL2-2.28.2\x86_64-w64-mingw32\include

Search directories -> Linker:
D:\Lvgl\SDL2-devel-2.28.2-mingw\SDL2-2.28.2\x86_64-w64-mingw32\lib
D:\Lvgl\SDL2-devel-2.28.2-mingw\SDL2-2.28.2\x86_64-w64-mingw32\bin

大帅
1 声望0 粉丝

引用和评论

0 条评论