您的位置:首页 > 编程语言 > PHP开发

xp下用Cygwin模拟unix编译php和扩展

2010-08-13 16:28 274 查看
 

Cygwin下载
网站http://www.cygwin.cn/pub
php-5.3.3.tar.gz
autoconf-2.13.tar.gz
1.Cygwin:
  
根据default安装
2.Cygwin:
   

flex
   
gcc-core
   
gcc-g++
   

libxml2
   

make
    
     

binutils
(2.20.51-2)
      
The GNU assembler, linker and binary
utilities
      
Required by: gcc-core, gcc-g++
      
     

gcc-mingw-core
(20050522-1)
      
Mingw32 support headers and
libraries for GCC
      
Required by: gcc-core
      
     

gcc-mingw-g++
(20050522-1)
      
Mingw32 support headers and
libraries for GCC C++
      
Required by: gcc-g++
      
     

libintl3
(0.14.5-1)
      
GNU Internationalization runtime
library
      
Required by: gcc-core, gcc-g++
      
     

m4
(1.4.14-1)
      
GNU implementation of the
traditional Unix macro processor.
      
Required by: flex
      
     

mingw-runtime
(3.18-1)
      
MinGW Runtime
      
Required by: gcc-core, gcc-g++
      
     

w32api
(3.14-1)
      
Win32 API header and library import
files
      
Required by: gcc-core, gcc-g++,
mingw-runtime
3.autoconf-2.13
 
./configure
 

make
 
make install
4../configure
 
configure: error: xml2-config not found.
Please check your libxml2 installation.
    
   

libxml2
   
libxml2-devel
    
     

libcharset1
(1.13.1-1)
      
GNU character set conversion library
and utilities - runtime (2)
      
Required by: libiconv
      
     

libiconv
(1.13.1-1)
      
GNU character set conversion library
and utilities
      
Required by: libxml2-devel
      
     

zlib-devel
(1.2.5-1)
      
The zlib compression/decompression
library (development)
      
Required by: libxml2-devel
5. make
   
错误
信息:
     

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
warning: --
     
export-dynamic is not supported for PE
targets, did you mean --export-all-symbol
     

s?
     
ext/iconv/iconv.o: In function
`_php_iconv_appendl':
     

/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:337: undefined
reference to `_iconv'
     

/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:374: undefined
reference to `_iconv'
     
ext/iconv/iconv.o: In function
`php_iconv_string':
     

/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:501: undefined
reference to `_iconv'
     

/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:521: undefined
reference to `_iconv'
     
ext/iconv/iconv.o: In function
`_php_iconv_strlen':
     

/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:615: undefined
reference to `_iconv'
     

ext/iconv/iconv.o:/cygdrive/g/ubuntu/php-5.3.3/ext/iconv/iconv.c:868:
more undefined references to `_iconv follow collect2: ld returned 1 exit
status
     
make: *** [sapi/cgi/php-cgi.exe] Error
1
      
   
configure添加参数
   
./configure --without-iconv
    
 

make
 
make install
  
 
安装成功。不过
生成的是.a文件
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息