ui笔记-sdl 环境搭建
vscode cpp 插件
ext install cpptools |
环境搭建 mac
vscode,sdl2,macbook 10.14.1 (18B75)
brew install sdl2
mkdir myproject |
main.cpp
|
把 /usr/local/Cellar/sdl2 下面的 include 和 lib 拷贝到 myproject 下面
Makefile 的内容
game: |
-I (i as in include) tells it additional include directories you want to add-L tells it additional library directories you want to add-l (lowercase l as in lib) tells it specific library binaries you want to add
编译项目
make game
运行,看到 “Hello World!” 输出表示 SDL 可用了
./play
环境搭建 linux -尚未验证
sudo apt-get update |