Linking with phobos on compiled dmd, osx 64bit

Nathan M. Swan nathanmswan at gmail.com
Wed Oct 10 22:20:54 PDT 2012


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



More information about the Digitalmars-d-learn mailing list