php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13264 Linking Error for Zend Functions while adding Extension Module on PHP Windows
Submitted: 2001-09-12 11:00 UTC Modified: 2001-09-12 16:52 UTC
From: atur at vigorsoft dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.0.6 OS: Windows NT 4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: atur at vigorsoft dot com
New email:
PHP Version: OS:

 

 [2001-09-12 11:00 UTC] atur at vigorsoft dot com
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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-12 16:52 UTC] sniper@php.net
Please ask support questions about writing extensions
on the php-dev@lists.php.net mailing list.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC