Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73564 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57958 invoked from network); 3 Apr 2014 11:15:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Apr 2014 11:15:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=oneil@saxonica.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=oneil@saxonica.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain saxonica.com from 217.69.47.236 cause and error) X-PHP-List-Original-Sender: oneil@saxonica.com X-Host-Fingerprint: 217.69.47.236 uk1rly2283.eechost.net Linux 2.6 Received: from [217.69.47.236] ([217.69.47.236:60728] helo=uk1rly2283.eechost.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/B7-15417-CC24D335 for ; Thu, 03 Apr 2014 06:15:25 -0500 Received: from [82.152.109.199] (helo=[192.168.0.112]) by uk1rly2283.eechost.net with esmtpa (Exim 4.72) (envelope-from ) id 1WVfdH-0000Mz-3k; Thu, 03 Apr 2014 12:16:31 +0100 Content-Type: multipart/mixed; boundary="Apple-Mail=_CA551A62-ACBB-4F72-958B-0EC1543ED599" Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) In-Reply-To: Date: Thu, 3 Apr 2014 12:15:22 +0100 Cc: internals@lists.php.net Message-ID: 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> To: Anatol Belski X-Mailer: Apple Mail (2.1874) X-Auth-Info: oneil@saxonica.com (plain) Subject: Re: [PHP-DEV] PHP C++ extension on Windows: setting the working directory the same as PHP From: oneil@saxonica.com (O'Neil Delpratt) --Apple-Mail=_CA551A62-ACBB-4F72-958B-0EC1543ED599 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi, Please find the php_Saxon.h file attached. I am a beginner to the world = of php extensions so you might spot things that I should not be doing. = Any way the liens of code that you should focus are: Line 29 (includes the required header) Lines between 143 - 160 If you need the full project let me know. I have been using VC11. for = the setup of the project I followed various tutorial guides such as: = http://www.dreamincode.net/forums/topic/244215-introduction-to-creating-a-= php-extension-for-windows/ kind regards, O'Neil =09 On 3 Apr 2014, at 11:47, Anatol Belski wrote: > Hi O'Neil, >=20 > On Thu, April 3, 2014 11:44, O'Neil Delpratt wrote: >> Just to report to the list that the linkage error has not gone away, = even >> with the extern =93C=94 wrapped around the include. It seems like I = need to >> add some library dependency? But my experience of Windows and c++ is >> limited. >>=20 >>=20 >> On 2 Apr 2014, at 15:42, Johannes Schl=FCter >> wrote: >>=20 >>=20 >>> On Wed, 2014-04-02 at 14:56 +0100, O'Neil Delpratt wrote: >>>=20 >>>> When I compile my code I am now getting the following error: >>>>=20 >>>>=20 >>>> Error 93 error LNK2001: unresolved external symbol >>>> "__declspec(dllimport) char * __cdecl virtual_getcwd(char = *,unsigned >>>> int,void * * *)" (__imp_?virtual_getcwd@@YAPADPADIPAPAPAX@Z) = C:\Users >>>> \ond1\Documents\Visual Studio 2012\Projects\saxon\saxon >>>> \SaxonProcessor.obj >>>>=20 >>>>=20 >>>> insertions in my C Code: >>>=20 >>> The subject talks about C++, now C. If you are using C++: Probably = that >>> header is missing extern "C" declarations? Try >>>=20 >>> extern "C" { #include "TSRM/tsrm_virtual_cwd.h" >>> } >>>=20 >>>=20 >>> johannes >>>=20 >>>=20 >>=20 >> ------------------------------- >> O'Neil Delpratt >> Software Developer, Saxonica Limited Email: oneil@saxonica.com >> Tel: +44 118 946 5894 >> Web: http://www.saxonica.com >> Saxonica Community site: http://dev.saxonica.com >> Bug tracking site: https://saxonica.plan.io/ >>=20 >>=20 >>=20 >>=20 >>=20 >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >>=20 >>=20 >>=20 > do you have your code somewhere around, or at least could you share a > problem snippet? >=20 > Regards >=20 > Anatol ------------------------------- O'Neil Delpratt Software Developer, Saxonica Limited Email: oneil@saxonica.com Tel: +44 118 946 5894 Web: http://www.saxonica.com Saxonica Community site: http://dev.saxonica.com Bug tracking site: https://saxonica.plan.io/ --Apple-Mail=_CA551A62-ACBB-4F72-958B-0EC1543ED599--