digitalmars.D.learn - Linking with phobos on compiled dmd, osx 64bit
- Nathan M. Swan (34/34) Oct 10 2012 Hello all! I've been hacking on dmd, and something hasn't been
- Jonathan M Davis (4/5) Oct 10 2012 You're building a 32-bit dmd and a 32-bit druntime with a 64-bit Phobos....
Hello all! I've been hacking on dmd, and something hasn't been working. This is how I compile it: cd dmd/src make -f posix.mak cd ../../druntime make -f posix.mak cd ../phobos make -f posix.mak MODEL=64 cp generated/osx/release/64/libphobos2.a /usr/local/lib/ cd ../dmd/src ./dmd file.d This is the error I get: ld: warning: ignoring file /usr/local/lib/libphobos2.a, file was built for archive which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_main", referenced from: start in crt1.10.6.o (maybe you meant: _D4file7no_mainFAAyaZv) "_D3std5stdio12__ModuleInfoZ", referenced from: _D4file12__ModuleInfoZ in file.o "_D3std5stdio6stdoutS3std5stdio4File", referenced from: _D3std5stdio16__T7writelnTAyaZ7writelnFAyaZv in file.o "_D15TypeInfo_Struct6__vtblZ", referenced from: _D47TypeInfo_S3std6traits15__T8DemangleTkZ8Demangle6__initZ in file.o "_D3std9exception7bailOutFNaNfAyakxAaZv", referenced from: _D3std9exception14__T7enforceTbZ7enforceFbLAxaAyakZb in file.o Any ideas on what's wrong? Thanks, NMS
Oct 10 2012
On Thursday, October 11, 2012 07:20:54 Nathan M. Swan wrote:Any ideas on what's wrong?You're building a 32-bit dmd and a 32-bit druntime with a 64-bit Phobos. Use MODEL=64 on all of them. - Jonathan M Davis
Oct 10 2012