Re: PHP C++ extension on Windows: setting the working directory the same as PHP

From: Date: Thu, 03 Apr 2014 11:15:22 +0000
Subject: Re: PHP C++ extension on Windows: setting the working directory the same as PHP
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-73564@lists.php.net to get a copy of this message
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 On 3 Apr 2014, at 11:47, Anatol Belski <anatol.php@belski.net> wrote: > Hi O'Neil, > > 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 “C” wrapped around the include. It seems like I need to >> add some library dependency? But my experience of Windows and c++ is >> limited. >> >> >> On 2 Apr 2014, at 15:42, Johannes Schlüter <johannes@schlueters.de> >> wrote: >> >> >>> On Wed, 2014-04-02 at 14:56 +0100, O'Neil Delpratt wrote: >>> >>>> When I compile my code I am now getting the following error: >>>> >>>> >>>> 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 >>>> >>>> >>>> insertions in my C Code: >>> >>> The subject talks about C++, now C. If you are using C++: Probably that >>> header is missing extern "C" declarations? Try >>> >>> extern "C" { #include "TSRM/tsrm_virtual_cwd.h" >>> } >>> >>> >>> johannes >>> >>> >> >> ------------------------------- >> 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/ >> >> >> >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> > do you have your code somewhere around, or at least could you share a > problem snippet? > > Regards > > 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/

« previous php.internals (#73564) next »