Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15901 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15545 invoked by uid 1010); 8 Apr 2005 01:04:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15523 invoked from network); 8 Apr 2005 01:04:31 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 8 Apr 2005 01:04:31 -0000 X-Host-Fingerprint: 17.250.248.84 smtpout.mac.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (1) Received: from ([17.250.248.84:62024] helo=smtpout.mac.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 68/94-19272-C98D5524 for ; Thu, 07 Apr 2005 21:04:28 -0400 Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout08/MantshX 4.0) with ESMTP id j3813tls008856; Thu, 7 Apr 2005 18:03:55 -0700 (PDT) Received: from [192.168.1.101] (pd9e21a29.dip.t-dialin.net [217.226.26.41]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id j3813oqg029245; Thu, 7 Apr 2005 18:03:52 -0700 (PDT) In-Reply-To: <4251EB7E.2080704@128kb.com> References: <4251EB7E.2080704@128kb.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <2108c40ed2666090dc9b631514b293be@mac.com> Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Fri, 8 Apr 2005 03:03:46 +0200 To: Justin Hannus X-Mailer: Apple Mail (2.619.2) Subject: Re: [PHP-DEV] Re: os x linking issue with extension From: lastobelus@mac.com (Michael Johnston) Hi, The config is: PHP_ARG_WITH(carbonae, for carbonae support, [ --with-carbonae Include Carbon Apple Events support]) if test "$PHP_CARBONAE" != "no"; then if test "`(uname) 2>/dev/null`" != "Darwin"; then AC_MSG_ERROR([--with-carbonae can only be used on Mac OS X systems.]) fi PHP_ADD_FRAMEWORK(Carbon) PHP_ADD_FRAMEWORK(CoreFoundation) PHP_ADD_FRAMEWORK(CoreServices) PHP_ADD_FRAMEWORK(ApplicationServices) PHP_NEW_EXTENSION(carbonae, carbonae.c, $ext_shared) fi This extension so far just has a simple function that makes a CFString to verify that carbon is getting loaded. The extension builds and loads, but when calling the function I get a symbol not found error from the dynamic linker. I want to wrap the Apple Event API, as the first part of porting appscript (http://freespace.virgin.net/hamish.sanderson/appscript.html), which is a python module that allows you to script applications as you would with applescript. Combined with PHPOSA, php would then become a scripting language for os x, that can be used to control applications. I am doing this because as a web developer I am quite familiar with php as a language, and I am. utterly. sick. of applescript. as a "language". (but I have to use it quite a lot for automating QuarkXPress workflow) Cheers, Michael Johnston On 5-Apr-05, at 3:35 AM, Justin Hannus wrote: > Can you post a link to your config.m4? > > PHP_ADD_FRAMEWORK(Framework) should do the trick. Try having a look at > the config.m4 for the OpenDirectory extension. It links to the > DirectoryService framework. > http://pecl.php.net/get/opendirectory-0.2.6.tgz > > Curious, what specific part of Carbon are you wrapping. Sounds > interesting. > > -Justin > > > Michael Johnston wrote: >> (I'm not sure if extension development belongs on this list, but I >> couldn't find a better one. If there is a more appropriate list, >> could someone please point me to it?) >> I am working on an extension that is os x specific & relies on Carbon >> & ApplicationServices (it is a port of appscript, to allow writing >> applescript applications in php). >> I used ext_skel to create an extension, and ran phpize. In the >> config.m4, I put: >> PHP_ADD_FRAMEWORK(Carbon) >> PHP_ADD_INCLUDE("/Developer/Headers/FlatCarbon") >> but when I attempt to use carbon api I get an undefined symbol error >> from the dynamic linker. >> looking at the configure script generated by phpize, it seemed to me >> that the PHP_ADD_FRAMEWORK macro is not actually being used to affect >> the build. I attempted to change this by manually editing the >> configure script to add $PHP_FRAMEWORKS to the arguments passed to >> linktool mode=link, and added PHP_VAR_SUBST="$PHP_FRAMEWORKS". >> Using make --debug, I verified that linktool mode=link was now being >> called with the -framework param, but I still get the same undefined >> symbol error. >> I don't know much about how the dynamic linker works. What do I need >> to do to have extension .so link to carbon? >> I am using the 5.0.3 release source package of php, os x 10.3.8, gcc >> 3.3 >> Michael Johnston > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >