Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74098 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19503 invoked from network); 9 May 2014 14:24:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2014 14:24:19 -0000 Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; 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:58985] helo=klapt.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/46-15882-115EC635 for ; Fri, 09 May 2014 10:24:18 -0400 Received: by klapt.com (Postfix, from userid 33) id A42E423D6106; Fri, 9 May 2014 16:24:14 +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:24:14 +0200 Message-ID: <340788cd8009f8b6e8aa28fcbcecddfc.squirrel@webmail.klapt.com> In-Reply-To: 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> Date: Fri, 9 May 2014 16:24:14 +0200 To: "Martin Keckeis" Cc: "O'Neil Delpratt" , "Pierre Joye" , "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") Martin, On Fri, May 9, 2014 13:39, Martin Keckeis wrote: > Hello together, > > > 2014-05-09 12:06 GMT+02:00 O'Neil Delpratt : > > >> >> 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 > > > I also try currently to port over this extension to windows: > https://github.com/piersharding/php-sapnwrfc/issues/6 > My progress is not bad...i think there are some incompabilities left > between the versions.....but there are no error messages left at compile > ...so its hard to figure out:-/ > > > my resources: https://wiki.php.net/internals/windows/stepbystepbuild > http://www.php.net/manual/en/internals2.buildsys.configwin.php > http://www.dreamincode.net/forums/topic/244215-introduction-to-creating-a- > php-extension-for-windows/ > > the bad things - there is no real documentation about config.w32 (i've > gone through pecl packages and ported my code from there - at least i didnt > found one... - what are the parameters for functions > like EXTENSION() CHECK_LIB() CHECK_HEADER_ADD_INCLUDE().....?? - i guess > them currently with the usage in the different pecl packages.... - what > kind of functions are available in config.w32? - the binarys-tools are > from 2011...no vc11 folder is created. > http://windows.php.net/downloads/php-sdk/ Regarding the config.w32 functions - one possibility is to lookup for them inside the configure.js as they're regular javascript functions. Generally I'd appreciate if you could add the issues you mentioned as bug tickets (one per ticket) and assign to the user ab. It is known but as usual with the sparse resources it's often to choose either to code or to document. > - in the package i have some lib dependencies -> they must be in the > deps/bin folder - how can i change the source path? only with > "--with-extra-libs" ? Yes, you can either use --with-extra-libs and --with-extra-includes or implement --with-myext=path/to/dep (or as an additional option like --with-myext-deps). Putting the deps into the core deps would work too, but imho that's an unclean way. > - there is the CHECK_LIB() function -> but why the lib is not taken from > there, instead of the deps/bin folder? > not sure to understand this, *.lib files should be in the deps\lib and if those libs are some dll import libs, so the corresponding dll should be in deps\bin Regards Anatol