On 05/04/2015 05:08 PM, Jaime E Oliver wrote:
Hi all,
I have successfully compiled a GEM external in OS X using the latest gem from git and Pd 0.45-5. When I try to load this external I get that it finds it, but complains about the architecture:
[…]/Gem-master/extra/pix_demo/pix_demo.pd_darwin: mach-o, but wrong architecture pix_demo ... couldn't create
so what's the architecture of pix_demo.pd_darwin, Gem.pd_darwin and Pd resp.?
I assume I need to add a flag but not entirely sure which one or where to put it.
most likely you are using an i386 Gem (as provided on gem.iem.at) and Pd, so you need to make sure that your external is i386 as well. do this by passing "-arch i386" (or even better. "-arch i386 -arch x86_64", which will give you fat binaries) to both the compiler and the linker.
if you build pix_demo in-tree (that is, in extra/, like pix_drum) using Gem's build-system, this should happen automatically via the @GEM_ARCH_CXXFLAGS@/@GEM_ARCH_LDFLAGS@ templates.
gfmsard IOhannes