RE: I'd like to work on AMFEXT

[email protected] ("J. Adams")
Newsgroups php.pecl.dev
Message-ID <[email protected]>
Thanks for your response Gustavo.

I have managed to complete the windows build thanks to help from 
#php.pecl at efnet.  I was also able to build in the dbase extension as 
described in the step-by-step build link you sent. 

I was also able to get amfext to build on my mac thanks to some patch 
suggestions from mmiko on #php.pecl at efnet.

I tried building the same modified amf.c into the PHP 5.3.3 on my 
windows machine and it failed. The result:
>    Creating library Release_TS\php5ts.lib and object Release_TS\php5ts.exp
> amf.obj : error LNK2001: unresolved external symbol _ZVAL_ADDREF
> amf.obj : error LNK2001: unresolved external symbol _ZVAL_DELREF
> amf.obj : error LNK2001: unresolved external symbol _ZVAL_REFCOUNT
> Release_TS\php5ts.dll : fatal error LNK1120: 3 unresolved externals
> NMAKE : fatal error U1077: '"D:\Program Files\Microsoft Visual Studio 
> 9.0\VC\Bin
> \cl.exe"' : return code '0x2'
> Stop.


I still can't get the CustomExt extension to build in Visual Studio 
despite my best efforts.  I get about 100 'already defined' errors.  
Here's tail end of it:
> 1>stdafx.obj : error LNK2005: "long double __cdecl sqrt(long double)" 
> (?sqrt@@YAOO@Z) already defined in dllmain.obj
> 1>stdafx.obj : error LNK2005: "long double __cdecl tan(long double)" 
> (?tan@@YAOO@Z) already defined in dllmain.obj
> 1>stdafx.obj : error LNK2005: "long double __cdecl tanh(long double)" 
> (?tanh@@YAOO@Z) already defined in dllmain.obj
> 1>   Creating library D:\Documents and Settings\jaith\My 
> Documents\Visual Studio\CustomExt\Debug\php_custom_ext.lib and object 
> D:\Documents and Settings\jaith\My Documents\Visual 
> Studio\CustomExt\Debug\php_custom_ext.exp
> 1>D:\Documents and Settings\jaith\My Documents\Visual 
> Studio\CustomExt\Debug\php_custom_ext.dll : fatal error LNK1169: one 
> or more multiply defined symbols found

I hope to submit a simple patch here soon.  IN the meantime, any 
suggestions about solving these issues are welcome.

> On Tue, 27 Jul 2010 22:35:02 +0100, j adams <[email protected]> wrote:
>
> > Thanks for your response, Johannes!
> >
> > I'm in touch with Emanuele Ruffaldi, the current maintainer, and he's  
> > been
> > encouraging. He recommended a setup involving Visual Studio which I'm a  
> > bit
> > skeptical about:
> > http://blog.slickedit.com/2007/09/creating-a-php-5-extension-with-visual-c-2005/
> >
>
> Despite what that blog post says, I'd recommend you do indeed build PHP  
>  from source and just add your extension to the ext/ directory of the  
> distribution.
>
> This wiki page will guide through the process:
> http://wiki.php.net/internals/windows/stepbystepbuild
>
> When you run buildconf, do instead
>
> buildconf --add-project-files
>
> This will create dsp files that you can then open in Visual Studio (I've  
> only hit a small bug, I had to add ".." or "..\.." -- can't recall which  
> -- to the include path of the extensions projects). All the shared  
> extensions that you build will end up in a solution, one project per  
> extension.
>
> This has several advantages: you get debug symbols for PHP itself without  
> the shortcomings of the debug symbols for the release versions, and you  
> also get a solution called "php5ts" with which you can easily explore the  
> Zend API through Intellisense.
>
> There's also #php-dev-win @ freenode
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.