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