[GEM-dev] Some hints for external on osx

james tittle tigital at mac.com
Tue Feb 1 22:25:56 CET 2005


On Feb 1, 2005, at 3:32 PM, Pierre Laborde wrote:

> By the way, as a workaround, I was thinking in compiling the whole GEM  
> from the Xcode project file that comes with the GEM source. But I miss  
> the GemLibs folder that is available only for NT and Linux. Where  
> could I find GemLibs for OSX ?

...GemLibs is also in cvs, and needs to be checked out like Gem  
was...however, you only really need freetype-2.1.9 and FTGL, and you  
can install them anywhere as long as you tell Xcode about it (via cmd-I  
"get info" on the red colored names)

> g++ -o pix_myblur.o -c pix_myblur.cpp -I../src
> g++ -bundle -undefined suppress -flat_namespace -o pix_myblur.pd_darwin
> pix_myblur.o
>
> running "./pd  -lib Gem -lib pix_myblur" results in the following:
>
> dyld: ./pd Undefined symbols:
> __ZN11imageStruct5clearEv
>

...actually, doesn't look like you're missing anything except for a  
patched version of pd :-)

http://sourceforge.net/tracker/index.php? 
func=detail&aid=1083495&group_id=55736&atid=478072

...this patch hasn't made it into miller's version (I'll commit it to  
the devel branches in cvs), but essentially solves yr problem...long  
ago we had a problem with loading externals that had similarly named  
symbols (ie. cyclone's prepend vs. maxlib's prepend):  this is known as  
the dreaded "namespace" problem...

...on linux and windoze, the behavior is that the "first symbol loaded  
wins", which means that if you wanted maxlib's prepend, you'd have to  
include it before cyclone in pd's flag list of loading libs

...on osx, there is an artificial partitioning of libraries into their  
own namespaces:  this was done several years ago because otherwise, if  
you tried to load two libraries with symbol's of the same name, pd  
would crash...the down side of this was that it prevented libraries  
from accessing symbols in other loaded libs, and this is what you're  
seeing:  you're "pix_myblur" can't access any of GEM's symbols...

...however, I found a way around this when I as trying to get the  
pdp2gem bridge to work, very simple...this patch only affects  
bundle/library loading on osx, and prevents crashing on multiple  
symbols (instead, it prints out a warning)...it also behaves like the  
other platforms as far as library precedence...

l8r,
jamie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2444 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/gem-dev/attachments/20050201/70dd1283/attachment.bin>


More information about the GEM-dev mailing list