www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - question about modules

reply bobef <bobef_member pathlink.com> writes:
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 :))))
Jan 22 2005
next sibling parent Lukas Pinkowski <Lukas.Pinkowski web.de> writes:
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
Jan 22 2005
prev sibling parent Chris Sauls <Chris_member pathlink.com> writes:
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
Jan 22 2005