Bug #62651 [Opn->Fbk]: Extensions out of PHP source tree does not build anymore (link problem)
| From: | pajoye@php.net | Date: | Tue, 24 Jul 2012 10:11:20 +0000 |
| Subject: | Bug #62651 [Opn->Fbk]: Extensions out of PHP source tree does not build anymore (link problem) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172200@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62651&edit=1
ID: 62651
Updated by: pajoye@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: Feedback
Type: Bug
Package: Compile Failure
Operating System: Windows 7
PHP Version: 5.4.5
Block user comment: N
Private report: N
New Comment:
This callback is part of the build (while interned string are only implemented in
NTS).
Please check a build of your ext using the supported ways, phpize or to build with
php to double check the actual problem.
Previous Comments:
------------------------------------------------------------------------
[2012-07-24 09:50:26] carlo dot pastorino at neologica dot it
Description:
------------
I have a PHP extension which adds some "native" functions and zend classes to
the PHP framework.
This extension is located out of the php source tree and it is built using a
Visual Studio 2008 project which
should set all the preprocessor definitions and .lib needed.
In order to build this extension i'm linking it to the php5ts.lib file included
inside the php-devel-pack (which
can be downloaded from here http://windows.php.net/downloads/releases/archives/)
and, of course, including the
*.h files provided with the php-devel-pack.
My Visual Studio solution worked fine using php5.2 and php5.3 includes and libs
but it fails the compilation
using the php5.4 php-devel-pack.
In particular I receive a link error:
unresolved external symbol "__declspec(dllimport) char const * (__cdecl*
zend_new_interned_string)(char const
*,int,int,void * * *)" (__imp_?zend_new_interned_string@@3P6APBDPBDHHPAPAPAX@ZA)
as if that symbol were not available from the php5ts.lib file.
I've generated a simpler Visual Studio solution containing ALL the files needed
to build which should present
the issue.
The solution can be downloaded here:
http://www.neologica.it/test_ext_vc9.7z
The source code contains a simple php extension and a zend class declaration
(Test) having a method: "sayHello".
Compiling it using the configuration *_5.3 should produce the dll correctly
while using the *_5.4 configuration
should trigger the link error.
I'm not sure if this is some unfortunate case of undeclared macro in my code /
solution, or if there is
something that could be done in php source.
Test script:
---------------
1 - Extract the archive
2 - Open the solution with Visual Studio (2008 or 2010 is the same)
3 - Select "Release_5.4" or "Debug_5.4" from the build Solution configurations
dropdown
4 - Build the extension.
Expected result:
----------------
php_test.dll correctly built
Actual result:
--------------
error LNK2001: unresolved external symbol "__declspec(dllimport) char const *
(__cdecl* zend_new_interned_string)(char const *,int,int,void * * *)" (__imp_?
zend_new_interned_string@@3P6APBDPBDHHPAPAPAX@ZA)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62651&edit=1