doumei9832 2011-09-02 15:10
浏览 66
已采纳

如何编译PECL php_intl库?

i need php_intl.dll for PHP 5.3.5 (VC6).

I couldn't find it anywhere so I decided to download source code and compile it myself.

I've downloaded the evaluation version of Microsoft Visual C++ Studio Express 2010 (the version with C++ compiler).

I downloaded the source in a .tgz package and unzipped it to my Desktop (new shiny folder named intl-1.1.2).

Now I open Visual C++ Studio, I go to NEW -> PROJECT FROM EXISTING CODE

and point to intl-1.1.2 folder on my Desktop.

Then I click on my newly created "solution" and click "BUILD SOLUTION" and this is what i get:

1>------ Build started: Project: php_intl, Configuration: Debug Win32 ------
1>  resourcebundle_iterator.c
1>resourcebundleesourcebundle_iterator.c(17): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  resourcebundle_class.c
1>resourcebundleesourcebundle_class.c(18): fatal error C1083: Cannot open include file: 'unicode/ures.h': No such file or directory
1>  resourcebundle.c
1>resourcebundleesourcebundle.c(17): fatal error C1083: Cannot open include file: 'unicode/ures.h': No such file or directory
1>  php_intl.c
1>c:\users\loostro\desktop\intl-1.1.2\php_intl.h(23): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  normalizer_normalize.c
1>normalizer
ormalizer_normalize.c(21): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  normalizer_class.c
1>c:\users\loostro\desktop\intl-1.1.2
ormalizer
ormalizer_class.h(20): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  normalizer.c
1>c:\users\loostro\desktop\intl-1.1.2
ormalizer
ormalizer_class.h(20): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  msgformat_parse.c
1>msgformat\msgformat_parse.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  msgformat_format.c
1>msgformat\msgformat_format.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  msgformat_data.c
1>msgformat\msgformat_data.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  msgformat_class.c
1>msgformat\msgformat_class.c(17): fatal error C1083: Cannot open include file: 'unicode/unum.h': No such file or directory
1>  msgformat_attr.c
1>msgformat\msgformat_attr.c(21): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  msgformat.c
1>msgformat\msgformat.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  locale_methods.c
1>locale\locale_methods.c(23): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  locale_class.c
1>locale\locale_class.c(19): fatal error C1083: Cannot open include file: 'unicode/uloc.h': No such file or directory
1>  locale.c
1>c:\users\loostro\desktop\intl-1.1.2\locale\locale_class.h(22): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  intl_error.c
1>intl_error.c(23): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  intl_convert.c
1>intl_convert.c(22): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  idn.c
1>idn\idn.c(25): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  grapheme_util.c
1>grapheme\grapheme_util.c(22): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  Generating Code...
1>  Compiling...
1>  grapheme_string.c
1>grapheme\grapheme_string.c(22): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  formatter_parse.c
1>formatter\formatter_parse.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  formatter_main.c
1>formatter\formatter_main.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  formatter_format.c
1>formatter\formatter_format.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  formatter_data.c
1>c:\users\loostro\desktop\intl-1.1.2\formatter\formatter_data.h(20): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  formatter_class.c
1>formatter\formatter_class.c(17): fatal error C1083: Cannot open include file: 'unicode/unum.h': No such file or directory
1>  formatter_attr.c
1>formatter\formatter_attr.c(21): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  formatter.c
1>formatter\formatter.c(21): fatal error C1083: Cannot open include file: 'unicode/utypes.h': No such file or directory
1>  dateformat_parse.c
1>dateformat\dateformat_parse.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  dateformat_format.c
1>dateformat\dateformat_format.c(21): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  dateformat_data.c
1>c:\users\loostro\desktop\intl-1.1.2\dateformat\dateformat_data.h(19): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  dateformat_class.c
1>dateformat\dateformat_class.c(16): fatal error C1083: Cannot open include file: 'unicode/unum.h': No such file or directory
1>  dateformat_attr.c
1>dateformat\dateformat_attr.c(20): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  dateformat.c
1>dateformat\dateformat.c(20): fatal error C1083: Cannot open include file: 'unicode/ustring.h': No such file or directory
1>  common_error.c
1>common\common_error.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_sort.c
1>collator\collator_sort.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_locale.c
1>collator\collator_locale.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_is_numeric.c
1>c:\users\loostro\desktop\intl-1.1.2\collator\collator_is_numeric.h(21): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  collator_error.c
1>collator\collator_error.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_create.c
1>collator\collator_create.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  Generating Code...
1>  Compiling...
1>  collator_convert.c
1>collator\collator_convert.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_compare.c
1>collator\collator_compare.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator_class.c
1>c:\users\loostro\desktop\intl-1.1.2\collator\collator_class.h(21): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  collator_attr.c
1>collator\collator_attr.c(22): fatal error C1083: Cannot open include file: 'php_intl.h': No such file or directory
1>  collator.c
1>c:\users\loostro\desktop\intl-1.1.2\collator\collator_class.h(21): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Please help me, what am I doing wrong?

  • 写回答

1条回答 默认 最新

  • dougongyou7364 2011-10-13 23:00
    关注

    I have no idea how to do it on Windows. On linux you need a package usually called php5-dev (on Debian based systems). You then just download the pecl package, and:

    cd /path/to/pecl/package/intl
    phpize
    ./configure
    make && make install
    

    If you can get the pecl binary (pecl.exe) it might be easier, you just have to run this on the console:

    pecl install intl
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题