3

I have installed dmd and ddt as instructed:

DMD64 D Compiler v2.066.0
Copyright (c) 1999-2014 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/

but when I create a dub project in eclipse, I dot an error that says standard libray not found:

Alt text
(source: p.im9.eu)

any ideas?

OS: Mac OSX 10.9 Eclipse: 4.4 DDT: 0.10.2

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
qed
  • 22,298
  • 21
  • 125
  • 196

3 Answers3

2

I've also posted a temporary workaround in the discussion group (link):

# cd /usr/share/dmd
# mkdir dummy
# mkdir dummy/bin
# touch dummy/bin/dmd
# launchctl setenv DUB_COMPILERS_PATH /usr/share/dmd/dummy/bin
# killall Dock

Note that the DUB_COMPILERS_PATH variable shouldn't point to the binary itself, it acts like an additional PATH variable, i.e should contain bin dirs.

To make this survive a reboot, add the launchctl line to /etc/launchd.conf:

launchctl setenv DUB_COMPILERS_PATH /usr/share/dmd/dummy/bin

You might need to create it if it doesn't already exist.

Amir Abiri
  • 8,847
  • 11
  • 41
  • 57
1

This seems to be a reported bug of DDT:

https://github.com/bruno-medeiros/DDT/issues/75

Basically, it boils down to the directory structure of the installed dmd. As they are many distributions and many installers, each one with its own convention, DDT missed some.

They should be added and recognized shortly, in the pending release.

Please follow the reported issue on github/DDT page.

user1284631
  • 4,446
  • 36
  • 61
  • Cool. I will wait for the next release then. By the way, is it possible to use ldc2 instead dmd? – qed Sep 14 '14 at 11:21
  • 1
    @qed: to compile, yes, as compilation goes through dub, which recognizes almost all compilers. For the IDE support, I think, also, yes. IIRC in previous version, gdc, ldc and dmd were correctly recognized. If the functionality is not yet implemented, it is sure that it will be shortly. – user1284631 Sep 14 '14 at 20:57
  • It shouldn't matter what compiler DDT finds, because within the IDE it only uses the compiler's standard library source files, which should be nearly the same across different compilers. Only when compiling (invoking dub) would there be a difference to which compiler is used. – BrunoMedeiros Sep 15 '14 at 12:51
  • Note that at the moment, ldc is one version behind dmd (2.0.65 / 2.0.66) And there are a few small but meaningful differences, for example [Range.sum()](http://dlang.org/phobos/std_algorithm.html#.sum). – Amir Abiri Sep 15 '14 at 16:01
  • Ah, yes, you're right. Only if the compiler/language versions are the same would there be no difference, otherwise it does. – BrunoMedeiros Oct 06 '14 at 12:37
0

Yes, I know this thread is really old, and yes DDT seems to be no longer in development.

However, for those of us who are new to D, Eclipse and DDT, and relatively new to using Linux (I'm using Mint 19.3), I have the following solution which worked for me. No doubt this is common knowledge somewhere, but I had to scratch around quite a lot to discover this. (Of course, your dmd version number may be different.)

  1. Note that dub is automatically installed along with dmd in:
    $HOME/dlang/dmd-2.090.1/linux/bin64/dub

  2. The command
    source ~/dlang/dmd-2.090.1/activate
    will modify the $PATH variable to allow access to the compiler.
    NOTE that this only changes the path for the shell where the command is issued... and only for the current session!

  3. If you want the path change to be permanent (who doesn't?), add the following to ~/.profile using a text editor, e.g. nano ~/.profile or xed ~/.profile , etc.:
    # Add dlang dmd compiler path if [ -d "$HOME/dlang/dmd-2.090.1/linux/bin64" ] ; then PATH="$HOME/dlang/dmd-2.090.1/linux/bin64:$PATH" fi

    This corrects the Eclipse error:
    "D Standard Library [Error: none found]"
    in the Project tree, and also allows dub to be run from any directory,
    e.g. from a terminal.

HTH.

SadSack963
  • 2,039
  • 2
  • 15
  • 10