Thread overview
question about modules
Jan 22, 2005
bobef
Jan 22, 2005
Lukas Pinkowski
Jan 22, 2005
Chris Sauls
January 22, 2005
RRRGGGHHH I hate this "no preprocessor" thing in D. Is there any way to import
module that is in .. &/| in directory that have . (dot(s)) in the name?

P.S. #include #define #if rules :))))


January 22, 2005
bobef wrote:

> RRRGGGHHH I hate this "no preprocessor" thing in D. Is there any way to
> import module that is in .. &/| in directory that have . (dot(s)) in the
> name?
> 
> P.S. #include #define #if rules :))))

Just use

dmd -I../path source.d

greetings,
Lukas
January 22, 2005
In article <csuh88$1fih$1@digitaldaemon.com>, bobef says...
>RRRGGGHHH I hate this "no preprocessor" thing in D. Is there any way to import
>module that is in .. &/| in directory that have . (dot(s)) in the name?

Sure.  Just use 'import' as normal, then on the command line, use the '-I' option to include the directory in your path.  Example:

dir tree:
myprog/
prog.d
somelib/
lib.d

in prog.d:
import somelib.lib;

on command line, with working directory of 'myprog':
dmd -I../somelib -ofmyprog.exe prog lib

Don't need no stinkin' headache-issuing pre-processor mojo.  :)

-- Chris Sauls