IOS开发环境搭建1(Xcode4.3.2+MacPorts2.1.1+OpenCV2.4.0)
开发硬件设备:MacBook Air/Pro
应用硬件设备:iPad、iPhone
开发环境搭建:
1.推荐系统升级到最新版本,我当前的版本Mac OS X 10.7.4
2.在AppStore下载Xcode,我下载的版本:Xcode 4.3.2
如果不配置Command Line Tools,在使用MacPorts安装软件的时候会出现如下错误信息
Warning:Seehttp://guide.macports.org/chunked/installing.xcode.htmlformoreinformation.
---> Computing dependencies for axelError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?会出现上述错误的原因
3.安装openCV(用MacPorts安装)
MacPorts简介
下载MacPorts 2.1.1
安装MacPorts
#MacPortsInstalleradditionon2012-01-21_at_00:18:10:addinganappropriatePATHvariableforusewithMacPorts.
exportPATH=/opt/local/bin:/opt/local/sbin:$PATH
#FinishedadaptingyourPATHenvironmentvariableforusewithMacPorts.
更新MacPorts索引
sudoport-vselfupdate
其中-v表示verbose(冗余),即把信息都显示到Shell上。selfupdate即官网上说的“foruserswhoalreadyhaveMacPortsinstalledandwishtoupgradetoanewerrelease.”
(注:这个要看网速,我的是10M光纤,基本上一下就过去了)portsearchNAME
安装新的软件
sudoportinstallNAME
卸载已安装的软件
sudoportuninstallNAME
查看版本较低的软件
portoutdated
升级版本较低的软件
sudo port upgrade outdatedMacPorts安装好后,开始安装OpenCV