Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15804 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77942 invoked by uid 1010); 5 Apr 2005 01:36:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 77924 invoked from network); 5 Apr 2005 01:36:18 -0000 Received: from unknown (HELO 128kb.com) (127.0.0.1) by localhost with SMTP; 5 Apr 2005 01:36:18 -0000 X-Host-Fingerprint: 68.112.247.235 cpe-68-112-247-235.ma.charter.com Linux 2.4/2.6 Received: from ([68.112.247.235:35278] helo=slack.128kb.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 02/44-19272-19BE1524 for ; Mon, 04 Apr 2005 21:36:17 -0400 Received: from [192.168.1.103] (wrtg [192.168.1.1]) by slack.128kb.com (8.12.10/8.12.8) with ESMTP id j34Dj5lB011366; Mon, 4 Apr 2005 09:45:10 -0400 Message-ID: <4251EB7E.2080704@128kb.com> Date: Mon, 04 Apr 2005 21:35:58 -0400 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Johnston CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: os x linking issue with extension From: jhannus@128kb.com (Justin Hannus) 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