SDL2 eclipse 添加SDL2.framework
- 
下载SDL2,地址如下: Mac: https://www.libsdl.org/ Linux: apt-cache search libsdl2 sudo apt-get install libsdl2-2.0-0 sudo apt-get install libsdl2-dev sudo apt-get install build-essential 
- 
安装针对Mac: SDL2-2.0.8.dmg ,将SDL2.framework 拖到/Library/Frameworks, 就这样安装完了。 
- 
Eclipse 工程添加SDL2: 
- 
右击工程目录->Properties->C/C++ Build->Setting->ToolSetting->Cross GCC Linker ,在Command里添加如下: gcc -F/Library/Frameworks -framework SDL2 -framework Cocoa 
- 
按照以上步骤,即可添加SDL2.