Search code examples
c++makefilervds

usage of exit command in Makefile causes compilation error


I am using the status of "mycommand" as below in Makefile

EXIT=exit 1
mycommand || $(EXIT)

with the above usage in Makefile while compiling i'm getting an error in windows.

Application encountered an unexpected error.  Stopping.

did i need to update any environmental variables or any settings.


Solution

  • When you exit with an exit code of 1 that signals an error. You should do exit 0 on success.