james tittle wrote:
On Sep 20, 2006, at 7:38 PM, chris clepper wrote:
On 9/20/06, Hans-Christoph Steiner hans@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
wow! do the change the preferred way of linking with every minor release?
i can understand that there might be some changes in the preferred loading mechanism after the macintel change (with the goal of supporting both architectures). but afair, they only changed the fundamental architecture once in the last 10 years...
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
so should we change the configure-checks for Gem? to either use "-dynamiclib -mmacosx-version-min=10.3 -undefined dynamic_lookup" or - if this is not supported - "-bundle -undefined suppress -flat_namespace"
mfg.asdr IOhannes