Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
February 06, 2007 stupid questions about compiler | ||||
---|---|---|---|---|
| ||||
Okay so I got the dmc compiler. Very portable, awesome. And please forgive me for being a coding noob. I've got two questions... First, how can I use the compiler from the command line on files in any directory without it being in the path? I'm trying to preserve portability, which means not setting all sorts of funky paths or installing on the HD. (I'm using a flash drive.) Second, is there any way to get dmc to only do a preprocess compile like you can with VC++'s cl compiler? (I'm actually wanting to use this on non C++ code but use the C++ preprocessor directives. I would like to replace cl with dmc for this instead of having both.) Thanks |
February 06, 2007 Re: stupid questions about compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mannon | Mannon wrote: > Okay so I got the dmc compiler. Very portable, awesome. And please > forgive me for being a coding noob. > > I've got two questions... > > First, how can I use the compiler from the command line on files > in any directory without it being in the path? I'm trying to > preserve portability, which means not setting all sorts of funky > paths or installing on the HD. (I'm using a flash drive.) Just prefix the dmc command with the path: \mypath\dmc file > Second, is there any way to get dmc to only do a preprocess > compile like you can with VC++'s cl compiler? (I'm actually > wanting to use this on non C++ code but use the C++ preprocessor > directives. I would like to replace cl with dmc for this instead > of having both.) You'll need the standalone preprocessor, sppn.exe, which comes on the DMC++ CD. |
February 06, 2007 Re: stupid questions about compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | awww yuck... Guess I'll stick with cl. Thanks. |
February 06, 2007 Re: stupid questions about compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Actually... I don't need to save the preprocessor output, I only need it output. Which looks like -e will do. I'm having trouble with it still though, because it's generating compiler errors. Maybe this will help... Here is the equivalent cl command line I'm trying to do. cl /nologo /X /u /IE:\Docs\Scripts\ /TcE:\nnmuld.esl /EP This results in the preprocessor outputting via cout basically, but no file is generated, and it doesn't error on my non C++ code. dmc nnmuld.esl /u /IE:\Docs\Scripts\ /e This is as close as I've gotten in dmc, but it gives me compiler errors and stops. |
February 07, 2007 Re: stupid questions about compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mannon | Mannon wrote:
> Actually... I don't need to save the preprocessor output, I only
> need it output. Which looks like -e will do.
>
> I'm having trouble with it still though, because it's generating
> compiler errors. Maybe this will help... Here is the equivalent cl
> command line I'm trying to do.
>
> cl /nologo /X /u /IE:\Docs\Scripts\ /TcE:\nnmuld.esl /EP
>
> This results in the preprocessor outputting via cout basically,
> but no file is generated, and it doesn't error on my non C++ code.
>
> dmc nnmuld.esl /u /IE:\Docs\Scripts\ /e
>
> This is as close as I've gotten in dmc, but it gives me compiler
> errors and stops.
Yes, because even with -e, it must be valid C/C++ code. If not, sppn.exe is the tool to use.
|
Copyright © 1999-2021 by the D Language Foundation