Bug #13264: Linking Error for Zend Functions while adding Extension Module on PHP Windows
| From: | atur at vigorsoft dot com | Date: | Wed, 12 Sep 2001 15:00:29 +0000 |
| Subject: | Bug #13264: Linking Error for Zend Functions while adding Extension Module on PHP Windows | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-65825@lists.php.net to get a copy of this message | ||
From: atur@vigorsoft.com
Operating system: Windows NT 4.0
PHP version: 4.0.6
PHP Bug Type: Dynamic loading
Bug description: Linking Error for Zend Functions while adding Extension Module on PHP Windows
Hi,
I have made PHP extenison module and used following :
PHP 4.0.6
Apache 1.3.20
Windows NT 4.0
Visual C++ 6.0
I am making mymodule.dll as an extension module.
It compiles well. But while linking gives this error :
error LNK2001: unresolve external symbol _zend_get_parameters_ex
error LNK2001: unresolve external symbol _zend_wrong_parameters_count
...etc...
The Zend API's in zend_API.h are not made extern "C".
NOTE : If I tried to extern "C" like this :
extern "C"
{
#include "zend_API.h"
}
It gives error as it includes headers files which contains templates
definations.
I think the Zend functions starting with macro ZEND_API
must be made extern "C" or using BEGIN_EXTERN_C() and END_EXTERN_C() macros
already defined in Zend.The problem is solved by doing so.
Regards,
Atur Shah.
--
Edit bug report at: http://bugs.php.net/?id=13264&edit=1