DMD on linux?

Sean Eskapp eatingstaples at gmail.com
Wed Mar 2 15:34:07 PST 2011


== Quote from Jonathan M Davis (jmdavisProg at gmx.com)'s article
> On Wednesday, March 02, 2011 13:52:29 Sean Eskapp wrote:
> > I'm trying to work with D on Ubuntu, but I keep having this
issue:
> >
> > ...
> > function  func
> > function  func
> > gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker
> > -L/usr/bin/../lib32 -Xlinker - L/usr/bin/../lib64 -Xlinker
> > --no-warn-search-mismatch -Xlinker --export-dynamic -lrt -
lphobos2
> > -lpthread -lm
> > /usr/bin/ld: cannot find -l-Xlinker
> > /usr/bin/ld: cannot find -lphobos2
> > collect2: ld returned 1 exit status
> > --- errorlevel 1
> > make[1]: *** [all] Error 1
> > ...
> >
> > I downloaded the DMD v2.052 ZIP from the download page,
extracted the
> > linux/bin folder into /usr/bin, the linux/lib64 folder into
/usr/lib64,
> > and the src folder into /usr/src. Can somebody please help?
> 1. I never bother installing the zip anywhere. If you just unzip
it and add
> /path/to/unzipped/dmd2/linux/bin to your path, then you should be
fine. I don't
> see any real reason to actual try and install dmd into your system
folders
> (though you obviously can if you want to).
> 2. Assuming that you _do_ move files around, you need to adjust
your dmd.conf so
> that it points to the appropriate places.
> 3. If you just moved files around, then you might not _have_ a
dmd.conf, and
> you're doubly screwed.
> Take a look at the documentation page for dmd on linux:
> http://www.digitalmars.com/d/2.0/dmd-linux.html
> It's slightly out of date, since with the last release, 64-bit
support was
> added, and the 32-bit version of libphobos.a is in
> /path/to/unzipped/dmd2/linux/lib32 and the 64-bit version is in
> /path/to/unzipped/dmd2/linux/lib64, but the instructions should be
correct
> otherwise.
> You need to make sure that dmd is on your path and that a version
of dmd.conf
> which points to the place where libphobos2.a is is in one of the
places that dmd
> looks for dmd.conf (as described on that page). Also, make sure
that you're
> using a dmd.conf based on the most recent version, or you could be
missing
> necessary linker flags.
> - Jonathan M Davis

Hmm my dmd.conf seems fine, but since the .deb has been updated, I
can just use that. Thanks!


More information about the Digitalmars-d-learn mailing list