DMD via MacPorts has a problem

Jordi Sayol g.sayol at yahoo.es
Tue Jan 21 12:06:16 PST 2014


El 21/01/14 20:44, Russel Winder ha escrit:
> I have used the command:
> 
> dmd -shared -defaultlib=libphobos2.so -oflibsayhello.so
> source/sayHello.o -L-L.
> 
> successfully on Debian Unstable using the dmd-bin and libphobos2-dev
> debs from d-apt. However on OSX using the dmd and phobos ports as
> provided via MacPorts:
> 
> dmd -shared -defaultlib=libphobos2.so -oflibsayhello.so
> source/sayHello.o -L-L.
> ld: library not found for -llibphobos2.so
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> --- errorlevel 1
> 
> It seems that the phobos port only installs the static archive and not
> the dynamic library.
> 
> I appreciate the library should probably be called libphobos2.dylib
> rather than libphobos2.so on OSX but that is not provided.
> 

"libphobos2.so" for OSX is not yet available. You should use "libphobos2.a".

BTW This thread is provably for: digitalmars-d-learn at puremagic.com

-- 
Jordi Sayol


More information about the Digitalmars-d mailing list