Re: Compiling PHP extension on windows
| From: | Zhuguo Shi | Date: | Tue, 14 Apr 2009 08:04:11 +0000 |
| Subject: | Re: Compiling PHP extension on windows | ||
| References: | 1 2 3 4 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-6316@lists.php.net to get a copy of this message | ||
Hi there,
I just got new progress. I compiled my own extension without error (but have
some warnings). Now after test I got a new error
PHP Warning: PHP Startup: Unable to load dynamic library
> 'C:\Server\PHP\ext\php
> _myext.dll' - Invalid access to memory location.
> in Unknown on line 0
Can any one help me??
Any help is appreciated! Thanks in advance!
On Tue, Apr 14, 2009 at 2:02 PM, Zhuguo Shi <blueflycn@gmail.com> wrote:
> I run the phpinfo.php in command line, and it gave me a warning:
>
> PHP Warning: PHP Startup: Invalid library <May be not a PHP library>
>> 'php_customs_ext.dll' in Unknown line 0;
>>
>
> I built this extension according to
> http://blog.slickedit.com/?p=128, but
> I added many code to it.
>
> Any one give some clues?
>
> Thanks~
>
>
> On Tue, Apr 14, 2009 at 11:38 AM, Zhuguo Shi <blueflycn@gmail.com> wrote:
>
>> Yes, it is my extension. The error I got is
>>
>> fatal error LNK1169: one or more multiply defined symbols found
>>
>>
>> This extension works fine on Linux but I don't know why it can not be
>> compiled on Windows.
>>
>> Perhaps wrong name space? (It uses C++)
>>
>> When added '/force' option to linker, it can be compiled. But the
>> generated dll doesn't work in PHP.
>>
>> Any help is appreciated.
>>
>> On Tue, Apr 14, 2009 at 11:24 AM, Kalle Sommer Nielsen <kalle@php.net>wrote:
>>
>>> Hi Zhuguo
>>>
>>> 2009/4/14 Zhuguo Shi <blueflycn@gmail.com>:
>>> > Hi there,
>>> >
>>> > I am building a extension on windows platform (vs 2005). I got some
>>> errors
>>> > when linking objects:
>>> > fatal error LNK1169: one or more multiply defined symbols found.So add
>>> > "/force" option in linker.
>>>
>>> when you're building, do you get any compilation warnings from your
>>> extension? or if its not your extension, which one are you trying to
>>> compile?
>>> >
>>> > Then it generated a dll but it doesn't work in PHP (seems can not be
>>> > loaded).
>>> >
>>> > How can I solve this or test a dll under PHP?
>>> >
>>> > Anyone can help me?
>>> >
>>>
>>>
>>>
>>> --
>>> Kalle Sommer Nielsen
>>> kalle@php.net
>>>
>>
>>
>