Re: [PECL-DEV] RE: I'd like to work on AMFEXT

[email protected] (Pierre Joye)
Newsgroups php.pecl.dev
Message-ID <[email protected]>
hi,

On Thu, Jul 29, 2010 at 6:05 AM, J. Adams <[email protected]> wrote:

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

These macros have been rewamped in 5.3 and all you need is to define
them depending on the PHP version.
See the other extensions in PECL about how to do it, very straightforward.

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
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.