[PD] Miller's pd 0.40 OSX loader

james tittle tigital at mac.com
Thu Sep 21 20:33:15 CEST 2006


On Sep 20, 2006, at 7:38 PM, chris clepper wrote:

> On 9/20/06, Hans-Christoph Steiner <hans at eds.org> wrote:
>
>
> Yes, on Mac OS X, the externals have to be built against a Pd that  
> supports dlopen(), otherwise they won't work.
>
> I think they just need to be built as dylib and not bundle.  I have  
> not tested 0.40 to confirm yet.

...thought I mentioned this before, back when I first discovered that  
apple had blessed dlopen() over NSBundle & friends?  If not, then  
yes, I am building externals as dynamic library's, which can be done by:

-dynamiclib -mmacosx-version-min=10.3 -undefined dynamic_lookup

...in other words, "-bundle -undefined suppress -flat_namespace" is  
deprecated, but oddly enough, I have no problems loading them with  
the dlopen() loader code, even mixing up bundles and dylibs...

...lastly, for optimized builds, apple continues to recommend -Os  
over -O2 or -O3...

...so, in sum, here's the linker line from a recent development build  
of gem:

/usr/bin/g++-4.0 -o /Users/tigital/puredataDev/Gem/build/Development/ 
Gem.pd_darwin -L/Users/tigital/puredataDev/Gem/build/Development - 
L../../dev/libs -L../GemLibs/FTGL/mac/build/Deployment -F/Users/ 
tigital/puredataDev/Gem/build/Development -F/Users/tigital/Library/ 
Frameworks -filelist /Users/tigital/puredataDev/Gem/build/ 
GEM_darwin.build/Development/gem_darwin.build/Objects-normal/ppc/ 
Gem.LinkFileList -framework AGL -framework Carbon -framework GLUT - 
framework OpenGL -framework QuickTime -lftgl -arch ppc -Wl,- 
single_module -install_name @executable_path/../Resources/extra/ 
Gem.pd_darwin -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.3 - 
undefined dynamic_lookup -lz -lfreetype -Xlinker -Y -Xlinker 100

jamie




More information about the Pd-list mailing list