Edit report at https://bugs.php.net/bug.php?id=62651&edit=1
ID: 62651 Updated by: cataphr...@php.net Reported by: carlo dot pastorino at neologica dot it Summary: Extensions out of PHP source tree does not build anymore (link problem) -Status: Open +Status: Closed Type: Bug Package: Compile Failure Operating System: Windows 7 PHP Version: 5.4.5 -Assigned To: +Assigned To: cataphract Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-07-27 14:48:00] cataphr...@php.net Automatic comment on behalf of cataphract Revision: http://git.php.net/?p=php-src.git;a=commit;h=594397993dcbbf2fd90f6df23a2124c0239ec73e Log: Fix bug #62651: source level BC break ------------------------------------------------------------------------ [2012-07-27 14:47:59] cataphr...@php.net Automatic comment on behalf of cataphract Revision: http://git.php.net/?p=php-src.git;a=commit;h=ccffec74d070e862cae8d8752d716eabb53002b3 Log: Fix bug #62651: source level BC break ------------------------------------------------------------------------ [2012-07-24 12:52:37] carlo dot pastorino at neologica dot it Thank you "cataphract" that solved the issue !! ;-) I was actually including only "php.h" and changing that to: extern "C" { #include "php.h" } did the trick. I'm however quite confused, this same #include worked well for php5.3 without the "extern" thing. I took a look at, for example, "zend.h" header and I saw that all the declaration marked as ZEND_API are also wrapped by the "BEGIN_EXTERN_C()" and "END_EXTERN_C()" macros, but, inside the header "zend_string.h" which is the one causing me this link problem, all the ZEND_API declaration are not wrapped by those 2 macros. Is there some particular reason for this ? I also found that, now that you've enlightened me, another solution to my problem is to wrap those function in the zend_string.h like this: BEGIN_EXTERN_C() // was missing previosly ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC); ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D); ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D); END_EXTERN_C() // was missing previosly But in this case I really don't know if it works by chance or if it was really meant to be like it was before. Thank you for you help! Carlo Pastorino. ------------------------------------------------------------------------ [2012-07-24 12:18:12] cataphr...@php.net Judging by the name of the symbol the linker can't find (namely it's name mangling), it's pretty obvious you're compiling your project as C++. Make sure you're including the PHP headers inside an extern "C" {} block. ------------------------------------------------------------------------ [2012-07-24 12:15:42] paj...@php.net No idea about sln, it may differ as phpize generates some data. About another test, can you try to build it with php? php-sdk\vc9\x86 |_ php-src |_ pecl |_ yourext run buildconf from php-src, then: configure <options needed> etc. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62651 -- Edit this bug report at https://bugs.php.net/bug.php?id=62651&edit=1