#42252 [NEW]: Windows compile failure with mbstring and zend_multibyte
| From: | okabe at zend dot co dot jp | Date: | Thu, 09 Aug 2007 03:11:13 +0000 |
| Subject: | #42252 [NEW]: Windows compile failure with mbstring and zend_multibyte | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-115898@lists.php.net to get a copy of this message | ||
From: okabe at zend dot co dot jp
Operating system: Windows 2003
PHP version: 4.4.7
PHP Bug Type: Compile Failure
Bug description: Windows compile failure with mbstring and zend_multibyte
Description:
------------
I want to build php4.4.7 with mbstring and zend multibyte because to use
Japanese character set that is called "Shift_JIS".
I am able to build normal win32's php.exe (have no mbstring) using
php4ts.dsw by following the php manual.
Then, at first, I add lines to config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
#define HAVE_MBSTRING 1
#define HAVE_MBREGEX 1
#define HAVE_MBSTR_CN 1
#define HAVE_MBSTR_JA 1
#define HAVE_MBSTR_KR 1
#define HAVE_MBSTR_RU 1
#define HAVE_MBSTR_TW 1
#define MBSTRING_EXPORTS 1
#undef COMPILE_DL_MBSTRING
---
and I add line to zend_config.w32.h as follows...
---
#define ZEND_MULTIBYTE 1
---
next,
I added source files about under ext/mbstring to php4dllts.dsp.
(making mbstring folder in Function Modules and import those files and
folders)
next,
I built the project, and watching the include errors.
This work was repeated and the path of the include error was corrected.
Finally,
four errors C2099(initializer is not a constant.) and much warnings
C4013(undefined; assuming extern returning int) and C4273(inconsistent dll
linkage. dllexport assumed.) remained.
---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013:
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' :
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099:
:
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) : error
C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(121) : error
C2099:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(131) : error
C2099:
---
Then, what should I do?
I'm using VC6.
Actual result:
--------------
build message is follows...
---
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(783) :
warning C4013: '_mbschr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(784) :
warning C4013: '_mbscspn' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(785) :
warning C4013: '_mbsnbcat' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(786) :
warning C4013: '_mbsnbcpy' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(787) :
warning C4013: '_mbspbrk' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(788) :
warning C4013: '_mbsrchr' undefined; assuming extern returning int
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\tchar.h(789) :
warning C4013: '_mbsspn' undefined; assuming extern returning int
:
omit
:
--------------------configure: php4dllts - Win32
Release_TS--------------------
Generating ext/standard/parsedate.c
compiling resource...
compiling...
:
omit
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(110) : warning
C4273: 'mbfl_buffer_converter_new' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(154) : warning
C4273: 'mbfl_buffer_converter_delete' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(169) : warning
C4273: 'mbfl_buffer_converter_reset' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(175) : warning
C4273: 'mbfl_buffer_converter_illegal_mode' : inconsistent dll linkage.
dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(191) : warning
C4273: 'mbfl_buffer_converter_illegal_substchar' : inconsistent dll
linkage. dllexport assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfilter.c(207) : warning
C4273: 'mbfl_buffer_converter_strncat' : inconsistent dll linkage.
dllexport assumed.
:
omit
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(100) : warning
C4273: 'mbfl_convert_filter_list' : inconsistent dll linkage. dllexport
assumed.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(214) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_convert.c(225) : warning
C4273: 'mbfl_convert_filter_new' : inconsistent dll linkage. dllexport
assumed.
:
omit
:
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(119) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(121) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(131) : error
C2099: initializer is not a constant.
C:\work\php-4.4.7\ext\mbstring\libmbfl\mbfl\mbfl_encoding.c(187) : warning
C4273: 'mbfl_name2encoding' : inconsistent dll linkage. dllexport assumed.
:
omit
--
Edit bug report at http://bugs.php.net/?id=42252&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42252&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42252&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42252&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42252&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42252&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42252&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42252&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42252&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42252&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42252&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42252&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42252&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42252&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42252&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42252&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42252&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42252&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42252&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42252&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42252&r=mysqlcfg