teething troubles
Dean via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Jul 17 01:07:04 PDT 2014
Hi all,
I need a little helping hand with dmd on a 32 bit Debian box. I
installed dmd from http://d-apt.sourceforge.net/
i) First trial:
====================
$cat test.d
import std.stdio;
void main() {
writeln("hello");
}
$ time dmd test.d
real 0m2.355s
user 0m1.652s
sys 0m0.364s
$./test
hello
$ dmd -v test.d | wc -l
84
====================
Seems to be working. My only concern is whether 2.35s for
compiling such a trivial file is normal.
ii) 2nd trial
======================
I installed gdc. Now I get
$ time gdc test.d
real 0m6.286s
user 0m3.856s
sys 0m0.884s
======================
Given the dmd and gdc timings, it seems I am doing something
wrong.
iii) 3rd trial
I installed tango from http://d-apt.sourceforge.net/ I know this
can ruffle feathers. Please assume good faith. I am just trying
to learn from the tango book.
=======================
$ls /usr/include/dmd/tango
core io math net stdc sys text time util
$cat test.d
import tango.io.Stdout;
void main() {
Stdout ("hello").newline;
}
$dmd -I/usr/include/dmd/tango -v test.d
binary dmd
version v2.065
config /etc/dmd.conf
parse test
importall test
import object
(/usr/include/dmd/druntime/import/object.di)
import tango.io.Stdout (tango/io/Stdout.d)
test.d(1): Error: module Stdout is in file 'tango/io/Stdout.d'
which cannot be read
import path[0] = /usr/include/dmd/tango
import path[1] = /usr/include/dmd/phobos
import path[2] = /usr/include/dmd/druntime/import
It seems inspite of specifying usr/include/dmd/tango it cannot
import tango.io.Stdout.
Here is my /etc/dmd.conf
[Environment32]
DFLAGS=-I/usr/include/dmd/phobos
-I/usr/include/dmd/druntime/import -L-L/usr/lib/i386-linux-gnu
-L--export-dynamics
What am I doing wrong.
Thanks for the help.
-- Dean
More information about the Digitalmars-d-learn
mailing list