-m64 doesn't work?

Michel Fortin michel.fortin at michelf.com
Sun Feb 12 06:42:13 PST 2012

On Sunday, 12 February 2012 at 08:26:07 UTC, Andre Tampubolon 

>  |-lib32 (libdruntime-linux32.a and libphobos.a)
>  |-lib64 (libdruntime-linux64.a and libphobos.a)

... Are you sure it's libphobos.a and not libphobos2.a?

> dmd -32 works fine. But either dmd or dmd -m64 doesn't work, 
> e.g:
> $ dmd -m64 einstein2b.d
> /usr/bin/ld: skipping incompatible 
> /opt/dmd-dev/lib32//libphobos2.a when searching for -lphobos2
> /usr/bin/ld: cannot find -lphobos2
> collect2: ld returned 1 exit status
> --- errorlevel 1
> I wonder why ld searches at /opt/dmd-dev/lib32, whereas it 
> should be /opt/dmd-dev/lib64 ?

Actually it searches both directories all the time because 
dmd.conf adds the two to the link path. The theory is that the 
linker should just discard the wrong one.

Michel Fortin
michel.fortin at michelf.com

More information about the Digitalmars-d mailing list