finding dmd.conf

Lutger lutger.blijdestijn at gmail.com
Sat Feb 28 02:47:27 PST 2009


Jesse Phillips wrote:

> On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote:
> 
>> I'm having some trouble with dmd.conf. I set up a (soft) symbolic link
>> to the dmdxxxx/bin path version I want to use, but dmd can't find
>> dmd.conf:
>> 
>> $> which dmd
>> /home/lutger/code/bin/dmd/bin/dmd
>> $> dmd main.d
>> object.d: module object cannot read file 'object.d' $>
>> /home/lutger/code/bin/dmd/bin/dmd main.d $>
>> 
>> Fully specifying the path works, and putting dmd.conf in /etc also
>> works, but is less than ideal. This is in bash (Konsole) on OpenSuse
>> 11.1.
>> 
>> Anybody an idea what I am doing wrong?
> 
> I'm not sure what you mean by "symbolic link to the dmdxxxx/bin path 
> version I want..."
> 
> DMD looks in only 2 places for dmd.conf, the location of the dmd 
> executable, in your case /home/lutger/code/bin/dmd/bin/, and /etc/

It also looks in HOME and the current directory.

I should have explained clearer. I have setup 3 installations of D that I 
use:

~/code/bin/dmd1033/bin
~/code/bin/dmd1037/bin
~/code/bin/dmd2025/bin

Then I make a symbolic link to one a these paths:
~/code/bin/dmd/bin

The symbolic link is in PATH. This way I can easily switch between whatever 
d executables, libraries and so forth as required while keeping them 
seperate. 

The problem I'm experiencing is that DMD can find dmd.conf in it's own path 
only when I fully qualify the dmd command like this: ~/code/bin/dmd/bin/dmd 
main.d
Putting dmd.conf in /etc works though, and putting dmd.conf in the current 
path (of the source I'm building) also works. 

Furthermore for D1 I'm using dsss in the same way and this doesn't cause any 
problems. I thought perhaps some other dmd got picked up, but 'which dmd' 
picks out the right path for dmd, if this command is reliable?



More information about the Digitalmars-d-learn mailing list