其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
自己编译(升级)PHP5中的gd库中的jpeg、freetype2、png

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

  PHP5中的gd库需要freetype、jpeg、libpng(need zlib)。

  开始准备工作:到http://sourceforge.net/projects/freetypehttp://sourceforge.net/projects/libpngftp://192.48.96.9/graphics/jpeg/下载相关包并解压。

  首先看看freetype的编译:进入F:\freetype-2.1.9\builds\win32\visualc用VC打开freetype.dsp编译win32 release。在objs得到freetype219.lib(这里是219版本),将其改名为freetype2.lib。拷贝到win32build/lib目录中覆盖。将include目录中的freetype.h、freetype目录、ft2build.h拷贝到win32build/include目录中覆盖。

  其次看看libpng的编译:进入F:\libpng-1.2.6\projects\visualc6用VC打开libpng.dsp编译win32 release dll和lib。将得到的libpng.dll拷贝到win32build/lib/dll中覆盖,将得到的libpng.lib拷贝到win32build/lib中覆盖。将其目录下的png.h、pngconf.h拷贝到win32build/include目录中覆盖。

  再来看看jpeg的编译,打开jpeg目录中的install.doc文件,里面有这样的说明:

To use:
1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and
   makeapps.ds to apps.mak.  (Note that the renaming is critical!)
2. Click on the .mak files to construct project workspaces.
   (If you are using DevStudio more recent than 4.2, you'll probably
   get a message saying that the makefiles are being updated.)
3. Build the library project, then the applications project.
4. Move the application .exe files from `app`\Release to an
   appropriate location on your path.
5. To perform the self-test, execute the command line
 NMAKE /f makefile.vc  test
  这样将得到libjpeg.lib,将其拷贝到win32build/lib中覆盖。将其目录下的jconfig.h、jerror.h、jmorecfg.h、jpeglib.h拷贝到win32build/include中覆盖。

  然后重新编译PHP5,你的GD库中的png、jpeg、freetype2就是最新的了。




相关文章

相关软件