c++ - stupid questions about compiler
- Mannon (13/13) Feb 06 2007 Okay so I got the dmc compiler. Very portable, awesome. And please
- Walter Bright (5/19) Feb 06 2007 Just prefix the dmc command with the path:
- Mannon (1/1) Feb 06 2007 awww yuck... Guess I'll stick with cl. Thanks.
- Mannon (11/11) Feb 06 2007 Actually... I don't need to save the preprocessor output, I only
- Walter Bright (3/19) Feb 06 2007 Yes, because even with -e, it must be valid C/C++ code. If not, sppn.exe...
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
Feb 06 2007
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 fileSecond, 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.
Feb 06 2007
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.
Feb 06 2007
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.
Feb 06 2007