Head First C学习之安装Allegro

找不到国内相关的帖子,只能用Google搜了。
https://wiki.allegro.cc/index.php?title=OSX,_Xcode_4,_Framework

https://wiki.allegro.cc/index.php?title=Install_Allegro5_From_GIT/OSX

首先是下载安装

打开终端,输入下载命令

#git clone https://github.com/liballeg/allegro5.git

或者:

# git clone git://git.code.sf.net/p/alleg/allegro

运行结果

Cloning into 'allegro5'...
remote: Counting objects: 97150, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 97150 (delta 8), reused 7 (delta 7), pack-reused 97139
Receiving objects: 100% (97150/97150), 31.27 MiB | 627.00 KiB/s, done.
Resolving deltas: 100% (75700/75700), done.
Checking connectivity... done.

进入allero5目录

#cd allegro5/

先安装CMake等工具。

构建代码是需要cmake
Mac OS X 安装 Homebrew&XCode&Cmake&Eclipse&Opencv
安装cmake又要先安装homebrew
http://brew.sh/index_zh-cn.html

  • 在终端输入安装homebrew的命令:
#/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • 在终端输入安装cmake命令:
# brew install cmake

# brew install zlib
# brew install freetype
# brew install jpeg
# brew install libogg
# brew install physfs
# brew install libpng
# brew install flac
# brew install ffmpeg

安装完cmake,可以继续安装allegro
创建一个构建目录

 # mkdir build
 # cd build
 # cmake -G Xcode -DWANT_FRAMEWORKS=1 - ..
 # xcodebuild
 # sudo xcodebuild install

你可能感兴趣的:(Head First C学习之安装Allegro)