将 YoMax 移植到 Linux 平台

Posted on the 八月 20th, 2008 under 程序开发 by Tommy

今天把 YoMax 移植到 Linux 平台了,还算顺利,一切都进行的不错。感觉很好,很开心。在 Linux 下面跑的速度很快,效果很好。

其中有几个地方修改了一下:

1)_strnicmp,在 Linux 的标准 C 库里面没有这个函数,用 strncasecmp 替换就可以了

2)_mkdir,同样,Linux 下的 C 库也没有这个函数,需要使用 mkdir。需要用到头文件 <sys/stat.h>,而且还要设置权限,跟 Windows 平台下不大一样。详细的使用说明,可以参考 GNU C Library 手册创建目录部分的内容。

3)还有就是简单的类型定义之类的细节不同了,以及 main 入口函数的声明不大一样

具体的参数和环境:

  • Windows 平台
    • Windows XP with Service Pack 3
    • Visual Studio 2005 with Service Pack 1
  • Linux 平台
    • Ubuntu 8.04.1 (Hardy Heron) with 2.6.24-19-generic
    • g++ v4.2.3 (Ubuntu 4.2.3-2ubuntu7)

One Response to '将 YoMax 移植到 Linux 平台'

  1. 2008年10月30号 23:39
    ManiacOfMadness

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>