Re: [INTERNALS-WIN] Developing PHP extensions on Windows with VC++, linking problems

[email protected] (Runar Bergeheim Olsen)
Newsgroups php.internals.win
Message-ID <[email protected]>
Hi,
In order to build your extension following the guide you linked to you need
to create a config.w32 build file. An easy example can be found in the JSON
extension[1]. Given that you've got your extension in the ext/ folder you
can build it by issuing buildconf && ./configure --enable-your-ext && nmake.
The build system is documentd in the manual aswell[2]

Runar

[1] http://cvs.php.net/viewvc.cgi/php-src/ext/json/config.w32?view=markup
[2] http://no.php.net/manual/zh/internals2.buildsys.php

2009/5/4 Eugenio Tacchini <[email protected]>

> Hello,
> thanks for your answers; is the *recommended* way the one you posted before
> http://blog.harddisk.is-a-geek.org/index.php/dev/php/php-on-windows/
> ?
>
> I didn't understand how to build my custom extension from the above page; I
> can write the C source file (the extension itself), I can compile a PHP
> source distribution (following the instruction you posted) but I don't how
> to links these two things: where should I put my extension C files?
> I also don't understand clearly this warning
> "warning: some extensions need libraries, header files and helper apps, i
> have NO idea how to get these working! "
>
> Can you help me?
>
> If someone also knows how to build extensions from within the IDE as Runar
> said please let me know.
>
>
> Thanks.
>
> Cheers,
>
> Eugenio
>
>
> At 10.28 30/04/2009 +0200, Pierre Joye wrote:
> >hi,
> >
> >No idea, it is not a supported or it is not the recommended way to do
> >it. It is very easy to compile php and custom extensions using the
> >current system, and the IDE can still be used for debugging/analyzing
> >:)
> >
> >Cheers,
> >
> >On Wed, Apr 29, 2009 at 9:05 PM, Runar Bergeheim Olsen
> ><[email protected]> wrote:
> >> Hi,
> >> I know Elizabeth Smith figured out how to setup a VC++ 2008 project so
> that
> >> it was possible to code and build extensions from within the IDE. As far
> as
> >> I remember it worked for both debug and release builds. I first found
> the
> >> project file in her winapi project, sadly I can't remember the SVN url
> right
> >> now. Maybe anyone here got it?
> >>
> >> Runar
> >>
> >> 2009/4/29 Pierre Joye <[email protected]>
> >>
> >>> hi,
> >>>
> >>> This tutorial is completely wrong, sorry.
> >>>
> >>> You can basically any tutorial about extending PHP and then build your
> >>> extension on Windows using the common method to compile PHP itself. A
> >>> short summary can be found here:
> >>>
> >>> http://blog.harddisk.is-a-geek.org/index.php/dev/php/php-on-windows/
> >>> (for php itself)
> >>>
> >>> Cheers,
> >>> --
> >>> Pierre
> >>>
> >>> On Mon, Apr 27, 2009 at 5:43 PM, Eugenio Tacchini <[email protected]
> >
> >>> wrote:
> >>> > Hi all,
> >>> > I had to create a PHP extension and I read this article:
> >>> > <
> >>>
> >http://www.talkphp.com/vbarticles.php?do=article&articleid=49&title=cr
> >eating-custom-php-extensions
> >>> >http://www.talkphp.com/vbarticles.ph...php-extensions
> >>> > Everything worked fine if I keep "Debug" as "Active solution
> >>> configuration"
> >>> > in "Build->Configuration manager"....but in this way I can only use
> the
> >>> > extension created on the machine I compiled it.
> >>> > If I choose "Release" instead of "Debug" I get a fatal error:
> >>> > dllmain.obj : fatal error LNK1179: invalid or corrupt file: duplicate
> >>> COMDAT
> >>> > '_putwchar'
> >>> > Can you help me?
> >>> >
> >>> > I'm using Visual C++ 2008 Express edition, PHP 5.2.4, Win xp home.
> >>> >
> >>> > Thanks!
> >>> >
> >>> > Cheers,
> >>> >
> >>> > Eugenio
> >>> >
> >>> > --
> >>> > Windows Internals Mailing List (http://www.php.net/)
> >>> > To unsubscribe, visit: http://www.php.net/unsub.php
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Pierre
> >>>
> >>> http://blog.thepimp.net | http://www.libgd.org
> >>>
> >>> --
> >>> Windows Internals Mailing List (http://www.php.net/)
> >>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>
> >>>
> >>
> >
> >
> >
> >--
> >Pierre
> >
> >http://blog.thepimp.net | http://www.libgd.org
> >
> >--
> >Windows Internals Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> Windows Internals Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
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.