compiling i386 on a ppc mac
Moritz Warning
moritzwarning at _nospam_web.de
Mon May 5 05:05:43 PDT 2008
I try to compile a program with gdc on a ppc mac:
gdc -o main main.d -arch i386 -fversion=Tango -fversion=Posix -L/SDKs/
MacOSX10.4u.sdk/usr/lib -L/SDKs/MacOSX10.4u.sdk/usr/lib/system -lgtango -
lz -lssl
But i get these errors on linking:
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning /usr/lib/
libcrypto.0.9.7.dylib cputype (18, architecture ppc) does not match
cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning fat file: /usr/lib/
system/libmathCommon.A.dylib does not contain an architecture that
matches the specified -arch flag: i386 (file ignored)
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_fegetround referenced from libSystem expected to be defined in /usr/lib/
system/libmathCommon.A.dylib
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.
I tried to specify them explicitly (e.g.: -L/SDKs/MacOSX10.4u.sdk/usr/lib/
libcrypto.0.9.7.dylib), but nothing changed.
:(
More information about the Digitalmars-d
mailing list