>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
fromzend.com/apidoc
>But when i want to load the .dll with dl() PHP says it is not a PHPlibrary
>
>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

Seam like you tries to declare two functions with the very same name.

Have you by some reason included the same file twice?

But it might be another problem to. Sometimes you have declared
everything properly, but still gets an error from the linker. This
is because some files might not be "touched" and the compiler wont
recompile them. To solve this situation, clean your project with
"Build->Clean", and then rebuild everything with "Build->Rebuild All".

>What am I doing wrong?

I have no idea... I am just making guesses.

>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)

Have you read the documentation about DLL's? It could be found in
the MSDN Library for Visual Studio. Search for DLL in the index,
and you will probably find everything you need to know there.

You can start it with 'Help->Index" in devstudio.



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to