簡體   English   中英

如何編譯PECL php_intl庫?

[英]How to compile PECL php_intl library?

我需要PHP 5.3.5( VC6 )的php_intl.dll

我在任何地方都找不到它,所以我決定下載源代碼並自己編譯。

我已經下載了Microsoft Visual C ++ Studio Express 2010的評估版(帶有C ++編譯器的版本)。

我將源代碼下載為.tgz軟件包,並將其解壓縮到我的桌面(名為intl-1.1.2的新閃亮文件夾)中。

現在,我打開Visual C ++ Studio,然后轉到“ 新建”->“從現有代碼生成項目”

並指向我的桌面上的intl-1.1.2文件夾。

然后,我單擊新創建的“解決方案”,然后單擊“構建的解決方案”,這就是我得到的:

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\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 ==========

請幫助我,我在做什么錯?

我不知道如何在Windows上執行此操作。 在Linux上,您需要一個通常稱為php5-dev的軟件包(在基於Debian的系統上)。 然后,您只需下載pecl軟件包,然后:

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

如果可以獲得pecl二進制文件(pecl.exe),則可能會更容易,您只需在控制台上運行它即可:

pecl install intl

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM