Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74100 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22800 invoked from network); 9 May 2014 14:40:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2014 14:40:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:59576] helo=klapt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/F6-15882-2C8EC635 for ; Fri, 09 May 2014 10:40:03 -0400 Received: by klapt.com (Postfix, from userid 33) id 92A0323D6106; Fri, 9 May 2014 16:39:59 +0200 (CEST) Received: from 94.216.58.240 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Fri, 9 May 2014 16:39:59 +0200 Message-ID: <2e318d7de9688d584b7ec2f0e7c3a925.squirrel@webmail.klapt.com> In-Reply-To: <536CE457.3020203@cubiclesoft.com> References: <42E6A56D-0FF1-4408-BCF5-DFBCEDA735EB@saxonica.com> <1396445137.2982.291.camel@guybrush> <2EF10AD3-FC2C-4F34-9639-8BC798DB0917@saxonica.com> <1396449767.2982.294.camel@guybrush> <40B86AC1-3057-4016-95E2-EB8E754A70E1@saxonica.com> <57711604dc923c34412021350230d52e.squirrel@webmail.klapt.com> <964B0802-BCEF-4A11-8660-B2E9DA592B9C@saxonica.com> <536CE457.3020203@cubiclesoft.com> Date: Fri, 9 May 2014 16:39:59 +0200 To: "Thomas Hruska" Cc: "PHP internals" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] PHP C++ extension on Windows From: anatol.php@belski.net ("Anatol Belski") Hi Thomas, On Fri, May 9, 2014 16:21, Thomas Hruska wrote: > On 5/9/2014 3:06 AM, O'Neil Delpratt wrote: > >> >> On 9 May 2014, at 10:26, Pierre Joye wrote: >> >> >>> hi, >>> >>> On Fri, May 9, 2014 at 11:20 AM, O'Neil Delpratt >>> wrote: >>> >>>> Hi, >>>> >>>> >>>> Is there a better way to build a PHP C++ extension for PHP 5.5 than >>>> in Visual studio? I know it can be done in the PHP build process >>>> for windows as described in the book “Extending and Embedding PHP” >>>> by Sara Golemon which I did try but failed with linking errors, >>>> maybe because of the config.w32 file not being setup properly. >>>> Under linux I have no issues. >>>> >>> >>> Actually the better and recommended way is not to use VS but for >>> debugging. >>> >>> See https://wiki.php.net/internals/windows/stepbystepbuild >>> >> >> >> How about building your own extension? There seems to be a lack of >> information about doing that on windows > > The Wiki link above does have implied instructions for building > extensions in it already (step 14): > > configure --disable-all --enable-cli --enable-[yourextension] > > Or --with-[yourextension] depending on your needs. But it isn't exactly > obvious. "$remains" doesn't mean anything to me. But the above is > sufficient to prepare to build a minimal PHP with support for your new > extension. > > PHP is very *NIX-centric, so I've found that writing an extension first > on a Linux host (e.g. Ubuntu) and then porting it to Windows is a lot > easier than the reverse. > that is discussable while often done exactly that way. The build system on windows mimics autotools so many function names are the same. As well as using --with-.. if you have a dep and --enable-.. if it has none. Regards -anatol