【问题标题】:usage of exit command in Makefile causes compilation error在 Makefile 中使用 exit 命令会导致编译错误
【发布时间】:2017-10-01 06:47:40
【问题描述】:

我在 Makefile 中使用如下“mycommand”的状态

EXIT=exit 1
mycommand || $(EXIT)

在编译时在 Makefile 中使用上述用法,我在 windows 中遇到错误。

Application encountered an unexpected error.  Stopping.

我是否需要更新任何环境变量或任何设置。

【问题讨论】:

    标签: c++ makefile rvds


    【解决方案1】:

    当您以退出代码 1 退出时,表示出现错误。您应该在成功时执行exit 0

    【讨论】:

    • 如果 mycommand 正确执行,则返回成功,否则返回错误。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-18
    相关资源
    最近更新 更多