Re: [PHP-DEV] Error Linking Win32 Extensions
Hi, for me, I've always copied over another projects *.dsp file and modified the related parts. I think you're getting a faster answer why this is so if you compare your Wizards generated file with the files within the PHP sources ... - Markus On Wed, Apr 24, 2002 at 08:50:35PM -0400, Igal Raizman wrote : Could you please tell me what type of Project do I need to create in Visual C++ ? I tried compiling and linking ctype and it works perfectly. I than copied by own extension code into php_ctype.c and it worked perfectly. However, when i tried to create my own project and use the same settings at the ctype project does, I got linking errors. I use the Win32-Dynamic Link Library option in the wizard and picked An empty dll project. should I be using something else ? Thanks. Frank M. Kromann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It is not enough to define COMPILE_DL(MODULENAME you also need this section #if COMPILE_DL_MODULENAME ZEND_GET_MODULE(MODULENAME) #endif and you need to define the module. I suggest you take a look at some of the other extensions 'ctype is a good place to start. It is a simple wrapper extension with only two files. - Frank Hey, thanks for the input, but I have that defined and it still doesnt work, any other ideas ? Brad Lafountain [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you probally need to define #define COMPILE_DL_(MODULENAME) - brad --- Igal Raizman [EMAIL PROTECTED] wrote: I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
you probally need to define #define COMPILE_DL_(MODULENAME) - brad --- Igal Raizman [EMAIL PROTECTED] wrote: I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
Hey, thanks for the input, but I have that defined and it still doesnt work, any other ideas ? Brad Lafountain [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you probally need to define #define COMPILE_DL_(MODULENAME) - brad --- Igal Raizman [EMAIL PROTECTED] wrote: I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
It is not enough to define COMPILE_DL(MODULENAME you also need this section #if COMPILE_DL_MODULENAME ZEND_GET_MODULE(MODULENAME) #endif and you need to define the module. I suggest you take a look at some of the other extensions 'ctype is a good place to start. It is a simple wrapper extension with only two files. - Frank Hey, thanks for the input, but I have that defined and it still doesnt work, any other ideas ? Brad Lafountain [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you probally need to define #define COMPILE_DL_(MODULENAME) - brad --- Igal Raizman [EMAIL PROTECTED] wrote: I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
Could you please tell me what type of Project do I need to create in Visual C++ ? I tried compiling and linking ctype and it works perfectly. I than copied by own extension code into php_ctype.c and it worked perfectly. However, when i tried to create my own project and use the same settings at the ctype project does, I got linking errors. I use the Win32-Dynamic Link Library option in the wizard and picked An empty dll project. should I be using something else ? Thanks. Frank M. Kromann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It is not enough to define COMPILE_DL(MODULENAME you also need this section #if COMPILE_DL_MODULENAME ZEND_GET_MODULE(MODULENAME) #endif and you need to define the module. I suggest you take a look at some of the other extensions 'ctype is a good place to start. It is a simple wrapper extension with only two files. - Frank Hey, thanks for the input, but I have that defined and it still doesnt work, any other ideas ? Brad Lafountain [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... you probally need to define #define COMPILE_DL_(MODULENAME) - brad --- Igal Raizman [EMAIL PROTECTED] wrote: I switched back to PHP 4.1.2 to see if it works there and it still doesnt. I will try to recompile the lib file on my own, but I've come across another problem. If I only one function and all it does is use zend_printf(); to print Hello World my extension compiles and links without any problems. However, when I try to dl() my dll I get an error saying the dll is not a valid library: Invalid library (maybe not a PHP library) 'Test.dll' Any ideas ? Markus Fischer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parameters@@YAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Error Linking Win32 Extensions
Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parametersYAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error Linking Win32 Extensions
It may certainly be the problem. Why don't you compile php4ts.lib on your own too ?! First try this. On Tue, Apr 23, 2002 at 08:37:00PM -0400, Igal Raizman wrote : Hello, I've set my VC++ 6.0 as I've been told to do here, and my extensions compile without any problems, errors or warnings. However, when it comes to linking I get the following error: php_test.obj : error LNK2001: unresolved external symbol __declspec(dllimport) int __cdecl zend_parse_parameters(int,void * * *,char *,...) (__imp_?zend_parse_parametersYAHHPAPAPAXPADZZ) ..\..\Release_TS/php_Test.dll : fatal error LNK1120: 1 unresolved externals I've made sure to include php4ts.lib in the project, so I have no idea what the problem could be. Note: I'm using the php4ts.lib from PHP version 4.1.2, but actually using PHP version 4.2.0 I'm not sure if this could be the problem, but I couldnt find php4ts.lib anywhere else but in the 4.1.2 dist. Thanks. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Mind if I MFH ? What QA did you do on it? the usual? ah... none :) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php