compiling i386 on a ppc mac
Anders F Björklund
afb at algonet.se
Mon May 5 12:07:09 PDT 2008
Moritz Warning wrote:
> The libraries in /usr/lib are indeed not for i386, but ppc only.
> But they are also in /SDKs/MacOSX10.4u.sdk/usr/lib for i386 (and ppc,
> universal binaries from xcode).
>
> Anyone knows how to convince gdc to look in the given include paths first
> for these files, too?
> It seems to work for other includes.
gdc -o main main.d -arch i386 -fversion=Tango -fversion=Posix \
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -lgtango -lz -lssl
As a one-time setup thing (and for convenience), you need to set up
symbolic links for libgphobos.a and libgtango.a to the SDK dir too:
sudo ln -s /usr/lib/libgphobos.a /Developer/SDKs/MacOSX10.4u.sdk/usr/lib
sudo ln -s /usr/lib/libgtango.a /Developer/SDKs/MacOSX10.4u.sdk/usr/lib
--anders
PS.
You can also build universal binaries, by using "-arch ppc -arch i386"
More information about the Digitalmars-d
mailing list