RE: [PHP-DEV] ext_skel and win32 project
| From: | Mike Berry-Porter | Date: | Mon, 09 Oct 2000 01:48:31 +0000 |
| Subject: | RE: [PHP-DEV] ext_skel and win32 project | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34483@lists.php.net to get a copy of this message | ||
Sure, not a problem. I'll put something together for you in the next few
days.
MBP
-----Original Message-----
From: Jouni Ahto [mailto:jah@php.net]
Sent: Monday, 9 October 2000 8:29 AM
To: Mike Berry-Porter
Cc: 'moshe doron'; php-dev@lists.php.net
Subject: RE: [PHP-DEV] ext_skel and win32 project
On Mon, 9 Oct 2000, Mike Berry-Porter wrote:
If you find some free time, could you please rewrite this message in a way
that could be included in README.EXT_SKEL? I wrote ext_skel to work on
Unix-like systems, but I haven't got a slightest idea what to do on
Windows. Also, if you have any ideas about what's missing or that would
help with creating extensions that work on Windows too, your comments
would be appreciated.
-- Jouni Ahto
> Moshe,
>
> Where to begin... I'm assuming you're trying to compile your extension
under
> Microsoft Visual C++ 6.0 (although older version probably do the same as
> what I'm about to tell you). Basically you need to create a project with
> various defines, include and library paths added to reflect the Unix based
> configuration. I wouldn't suggest you simply add your source to an
existing
> project, but rather create a new one. It allows you're code to be
> transportable to the next version.
>
> I won't go through ALL the ins and outs of the project settings you need
but
> below is some stuff to take into consideration. I've successfully moved a
> Linux created extension over to a WIN32 environment with relative ease.
I'll
> assume you have a basic idea about the concepts and areas within MSVC. I
> basically looked at some of the extensions that came with the PHP 4.0.2
> (e.g. OCI8). NOTE: You shouldn't have to change any of your code to get
the
> core PHP stuff to work.
>
> Under your new projects settings make the following changes (these will be
> for a release version, NOT a debug):
>
> C/C++ Tab:
> - I suggest under Code Generation make "use run-time library" as
> Multithreaded DLL
> - Under Preprocessor add the following string to the front of your
existing
> Preprocessor defines:
> ZEND_DEBUG=0,
> - Under Preprocessor add the following string to the END of your existing
> Preprocessor defines:
> ZTS=1,ZEND_WIN32,PHP_WIN32,HAVE_W4H=1,COMPILE_DL_W4H=1
> - Under Preprocessor add the following string to your "Additional include
> directories":
> ..\..\,..\..\main,..\..\Zend,..\..\..\bindlib_w32,..\..\TSRM
>
> Link Tab:
> - Output file name should be something useful (e.g.
> ..\..\Release_TS\php_myext.dll )
> - Add php4ts.lib to the front of your Object/library modules list
> - Under Input, add the following string to your Additional library path:
> ..\..\Release_TS,..\..\Release_TS_Inline
>
> That should be it. However, if you still need more help feel free to
contact
> myself or others on this group.
>
> Have fun...
>
> MBP
>
> Mike Berry-Porter
> mikebp@alverstone.com.au
>
>
> -----Original Message-----
> From: moshe doron [mailto:mosdoron@netvision.net.il]
> Sent: Friday, 6 October 2000 7:52 PM
> To: php-dev@lists.php.net
> Subject: [PHP-DEV] ext_skel and win32 project
>
>
> 1. i tried building defualt empty extention ( named 'w4h') using the
> ext_skal. it works ok on linux but i cant moving it into the win32
project.
>
> i did those steps:
> a. adding the w4h.c, php_w4h.h into the 'php4dlls' project.
> b. compile it now, the php not recognize the confirm_w4h_compiled():
> c. removing the '#if HAVE_W4H' line on 'w4h.c' cause 18 error... for
exmple:
>
> D:\php-dev\extdbg2\ext\w4h\w4h.c(38) : error C2065:
> 'php_if_confirm_w4h_compiled' : undeclared identifier
> D:\php-dev\extdbg2\ext\w4h\w4h.c(38) : error C2099: initializer is not a
> constant
> D:\php-dev\extdbg2\ext\w4h\w4h.c(45) : error C2065: 'php_minit_w4h' :
> undeclared identifier
> D:\php-dev\extdbg2\ext\w4h\w4h.c(45) : error C2099: initializer is not a
> constant
> D:\php-dev\extdbg2\ext\w4h\w4h.c(46) : error C2065: 'php_mshutdown_w4h' :
> undeclared identifier
> D:\php-dev\extdbg2\ext\w4h\w4h.c(46) : error C2099: initializer is not a
> constant
> D:\php-dev\extdbg2\ext\w4h\w4h.c(47) : error C2065: 'php_rinit_w4h' :
> undeclared identifier
> D:\php-dev\extdbg2\ext\w4h\w4h.c(47) : error C2099: initializer is not a
> constant
> D:\php-dev\extdbg2\ext\w4h\w4h.c(48) : error C2065: 'php_rshutdown_w4h' :
> undeclared identifier
> D:\php-dev\extdbg2\ext\w4h\w4h.c(48) : error C2099: initializer is not a
> constant
> D:\php-dev\extdbg2\ext\w4h\w4h.c(49) : error C2065: 'php_info_w4h' :
> undeclared identifier
> ....
> ...
>
> where is my mistake?
>
> thanks
> moshe.
> mosdoron@netvision.net.il
> icq: 1542485
>
>
>
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>