You can wrap the compiler executable in shell script or batch file with returns 0.
Then tell C::B to use the script/batch file.
I'm using C::B under Windows XP. If I launch the compiler and it produces warnings, it
returns value 1. Can you confirm C::B stops compiling when the compiler returns with
a non-zero value?
At the shell prompt I tried with this command:
> mycomp -c main.c -o main.obj & if errorlevel 1 ver
I use the CMD.EXE shell facilities to execute two commands: "mycomp" and "if".
errorlevel is the return value of the last executed command (in my case it's mycomp).
If the return value of mycomp is 1, I run the command ver (that outputs the version
of the shell) just to have a command that returns zero.
I changed the "Command line macro" in Advacend Settings in the following way:
$compiler $options -o $object $file & if errorlevel 1 ver
but the compilation doesn't work because "& if errorlevel 1 ver" are passed to the
compiler as other parameters and not as shell new command to execute after the
compiler.
Is the batch script the only solution?