Skip to content

Build failed at mbstring_arginfo.h on Windows(Visual C++) #13789

Closed
@youkidearitai

Description

@youkidearitai

Description

Build failed on Visual C++. mb_trim uses UTF-8 characters.

C:\php-sdk\php-src\ext\mbstring\mbstring_arginfo.h(127): error C2001: 定数が 2 行目に続いています。 (ソース ファイルをコンパイルしています ext\mbstring\mbstring.c)
C:\php-sdk\php-src\ext\mbstring\mbstring_arginfo.h(127): fatal error C1057: マクロ展開中に予期せぬ EOF を検出しました。 (ソース ファイルをコンパイルしています ext\mbstring\mbstring.c)
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"' : リターン コード '0x2'
Stop.

My environment is below:

  • Visual C++ 2019
  • Windows 11
  • Probably default character is cp932

I confirmed can compile below:

 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, characters, IS_STRING, 0, "\"\\f\\n\\r\\t\\v\\x00\240\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\205\u180e\"")

Probably, .stub.php is convert to UTF-8 characters, but Visual C++ can not compile.

I think there are multiple ways to fix it.

  • stub.php is not convert UTF-8 characters
  • As abode, fix mbstring_arginfo.h to escaped character.

Reported from Hirokawa san.

PHP Version

master

Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions