开发者

How to compile PECL php_intl library?

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>resourcebundle\resourcebundle_iterator.c(17): fatal error C1083: Cannot open include file: 'php.h': No such file or directory
1>  resourcebundle_class.c
1>resourcebundle\resourcebundle_class.c(18): fatal error C1083: Cannot open include file: 'unicode/ures.h': No such file or directory
1>  resourcebundle.c
1>resourcebundle\resourcebundle.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\normalizer_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\normalizer\normalizer_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\normalizer\normalizer_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\loost开发者_StackOverflow社区ro\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?


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜