if I run something like

msdev MyProgram.dsp /MAKE "ALL" /REBUILD > myBuild.log 2> myBuild.err

from the command line.
I would expect any build errors be put in myBuild.err. but regardless of
if MyProgram.dsp compiles myBuild.err is empty.

Is there an easy way to get just if the program compiled? and not have
to wade through miles of log files.
using Visual C++ 6.

Thanks How

Re: msdev - command line - stderr by Igor

Igor
Thu Oct 26 09:43:31 CDT 2006

hswerdfe <hswerdfe@example.com> wrote:
> if I run something like
>
> msdev MyProgram.dsp /MAKE "ALL" /REBUILD > myBuild.log 2> myBuild.err
>
> from the command line.
> I would expect any build errors be put in myBuild.err. but regardless
> of if MyProgram.dsp compiles myBuild.err is empty.
>
> Is there an easy way to get just if the program compiled? and not have
> to wade through miles of log files.
> using Visual C++ 6.

I believe the exit code from msdev would be 0 if build succeeded, and
greater than 0 in case of any error. In a batch file, you can test it
with "IF ERRORLEVEL" statement.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925



Re: msdev - command line - stderr by Ulrich

Ulrich
Fri Oct 27 02:22:35 CDT 2006

Igor Tandetnik wrote:
> hswerdfe <hswerdfe@example.com> wrote:
>> Is there an easy way to get just if the program compiled? and not have
>> to wade through miles of log files.
>> using Visual C++ 6.
>
> I believe the exit code from msdev would be 0 if build succeeded, and
> greater than 0 in case of any error. In a batch file, you can test it
> with "IF ERRORLEVEL" statement.

You can, but be careful! The check needs to be

if ERRORLEVEL 1 (
REM res>=1
echo failed
) else if ERRORLEVEL 0 (
REM res==0
echo success
) else (
REM res<0
echo failed
)

I think the less-than-zero case occurs when the projectfile is not present,
the requested configuration doesn't exist or the process was forcefully
killed. Further, the behaviour is specific to the version of the studio.

Uli


Re: msdev - command line - stderr by Alex

Alex
Fri Oct 27 04:46:22 CDT 2006

"hswerdfe" wrote:
> if I run something like
>
> msdev MyProgram.dsp /MAKE "ALL" /REBUILD > myBuild.log 2>
> myBuild.err
>
> from the command line.
> I would expect any build errors be put in myBuild.err. but
> regardless of if MyProgram.dsp compiles myBuild.err is
> empty.
>
> Is there an easy way to get just if the program compiled?
> and not have to wade through miles of log files.
> using Visual C++ 6.


MSDEV.EXE has speacial parameter `/OUT <filename>' for
writing log file. For more info look here:

"Building a Project from the Command Line"
http://msdn.microsoft.com/library/en-us/vcug98/html/_asug_building_a_project_from_the_command_line.asp

Also, run "MSDEV.EXE /?" to see full list of available
parametres. IIRC, MSDEV.EXE provides more parameters than
specified in MSDN.

In addition, you can consider exporting project to temporary
make file and then build it with NMAKE. The whole process
can be achieved through command line commands:

"Automated Builds in DevStudio, or the Night Build Scenario"
http://msdn.microsoft.com/library/en-us/dnvs600/html/autobld.asp


HTH
Alex