Hmm, using backticks will grab all error messages from the child process. Why not use system and redirect output from the compiler to a temporary file (within the string passed to system)? If there are errors returned, display the temporary file with Perl. | [reply] |
I'm not sure you're using perl for the right reasons here.
It sounds like what you're looking for is a Makefile? You
want to build a lot of stuff given different compiler options? | [reply] |
Tough one. MSDOS is a pain. Have you tried allocating
more memory for the DOS box? Worse case scenario, you could have perl write a batch file (cl -c myprog.c > tmpfile) and run that in a separate window, then run your program on the results. Of course, you could do that all in the same window with an ugly batch file:
@ECHO OFF
perl foobar.pl makebat ## creates TMP.BAT (the compiler)
TMP.BAT ## writes it's output to TMP.TXT
perl foobar.pl readresults
Bleh. Better to just mess with the memory. You might also
see if there is anyway you can get C++ to be more "memory friendly"
| [reply] [d/l] |