• 周五. 5月 2nd, 2025

SDL2 eclipse 添加SDL2.framework

SDL2  eclipse 添加SDL2.framework

  1. 下载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

  2. 安装针对Mac:

    SDL2-2.0.8.dmg ,将SDL2.framework 拖到/Library/Frameworks, 就这样安装完了。

  3. Eclipse 工程添加SDL2:

    1. 右击工程目录->Properties->C/C++ Build->Setting->ToolSetting->Cross GCC Linker ,在Command里添加如下:

      gcc -F/Library/Frameworks -framework SDL2 -framework Cocoa

  4. 按照以上步骤,即可添加SDL2.


相关文章

发表评论

您的电子邮箱地址不会被公开。