problem linking module
| From: | Bruno Haller | Date: | Tue, 14 Aug 2001 08:43:43 +0000 |
| Subject: | problem linking module | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-8831@lists.php.net to get a copy of this message | ||
Hello,
I am writing a PHP module like I already told in my last question.
I am using VC++ 6 on Win2000.
I finally managed to compile a module with the simple example from
zend.com/apidoc
But when i want to load the .dll with dl() PHP says it is not a PHP
library
I guess thats because it doesnt export any functions...
I tried to replace
ZEND_FUNCTION(first_module)
with
__declspec(dllexport) ZEND_FUNCTION(first_module)
but when i do this i get a linker error (it is a german VC++6, i will
try my best to translate the error message ;):
error C2375: 'zend_if_first_module' : redefinition; different link
see declaration of 'zend_if_first_module'
when i use
__declspec(dllexport) void __cdecl
firstmodule(INTERNAL_FUNCTION_PARAMETERS)
it says:
error LNK2001: unresolve external symbol _zend_if_first_module
What am I doing wrong? I am linking php4ts.lib
How do i write the function correct? I browsed the example workspaces
for the modules from the PHP source but somehow I didnt find out how it
works... (thats where I did copy the __declspec(dllexport) stuff from at
all)
Can someone help me?
Regards
Bruno