RE: [PHP-DEV] ext_skel and win32 project
| From: | Mike Berry-Porter | Date: | Tue, 10 Oct 2000 02:03:24 +0000 |
| Subject: | RE: [PHP-DEV] ext_skel and win32 project | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34541@lists.php.net to get a copy of this message | ||
Hi Moshe,
Hmm... No, you shouldn't have had to do that. Basically, what you've updated
should've been in place with the changes I suggested. The "Project Options"
text box is quite simply the "output" of what you put in the other project
settings areas. Of course if you need extra libraries for your module (such
as wsock32.lib in your case) then amend the instructions as needed (e.g. add
wsock32.lib, pdflib.lib, foobar.lib in the Project->Settings->Link, category
General in the Object/Library modules text box), but to just get a simple
extension working you shouldn't have to do anything more. Anyway, glad to
hear you had some success. :)
I'm putting together a more detailed set of instructions that will hopefully
be suitable for distribution with PHP, which will include details on making
a debug and release version of the code. My previous instructions were
purely for Win32 Release. Does anyone have any suggestions as to what else
should be mentioned?
Mike Berry-Porter
mikebp@alverstone.com.au
-----Original Message-----
From: moshe doron [mailto:mosdoron@netvision.net.il]
Sent: Tuesday, 10 October 2000 4:46 AM
To: php-dev@lists.php.net
Subject: Re: [PHP-DEV] ext_skel and win32 project
ok. thanks for all.
u miss some requiring updates:
on project->setting->link->general->project options, add (right befor the
'/nologo' word) this line:
wsock32.lib php4ts.lib /incremental:no /libpath:"..\..\Release_TS"
for release mode, ||:
wsock32.lib php4ts_debug.lib /incremental:no /libpath:"..\..\Debug_TS"
for debug one.
hope next days, i'll make ext_skel.bat script for autimation all the
procces.
moshe.
mosdoron@netvision.net.il
icq: 1542485
"Mike Berry-Porter" <Berry-PorterM@newcrest.com.au> wrote in message
news:E79F4E11522BD2119A590000F87C21820194CB07@pent04.newcrest.com.au...
> 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
>
--
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