2008年6月12日星期四

Build OGRE @ Linux

环境:Red Hat Enterprise Linux AS release 4 (Nahant Update 4) + MacOS 10.5.2(Leopad)
软件:Ogre 1.4.8
步骤:

这里面用了我为了试验而临时使用的本地路径,不能直接引用。

  1. 先将第三方依赖库下载build好,放到指定目录
  2. 通过configure配置ogre,参数:ZZIPLIB_LIBS=-lzzip ZZIPLIB_CFLAGS=-I./ OIS_CFLAGS=-I/home/G-BITS/doing/doing_p02_patch_linux/a02/3rd/include OIS_LIBS=-lOIS LDFLAGS=-L/home/G-BITS/doing/doing_p02_patch_linux/a02/3rd/lib/Linux CXXFLAGS=-I/home/G-BITS/doing/doing_p02_patch_linux/a02/3rd/include/freeimage/ ./configure --disable-devil --disable-cg
  3. make
  4. make install
  5. 前往X Server端启动、配置X
  6. 打开X(MacOS下应用程序->实用工具->X11)
  7. 开启X Client的权限,在X server的shell下运行:xhost +
  8. 回到Linux下
  9. cd OGRE目录/Samples/Common/bin
  10. 运行程序
如果是基于Mac工作,可能会有一个小意外,在Mac下访问ogre的源代码(比如从Mac复制到Linux),Mac会建立一大堆._打头的文件,会让Ogre启动后混乱。可以用以下命令删除:find . -iname "._*" -exec rm {} \;

没有评论:

发表评论