How do I report error messages to the IDE from a custom build tool?

霸气de小男生 提交于 2019-12-11 08:05:56

问题


I am using a custom build tool in Delphi XE3.

This executes as expected, but when my custom build tool fails for some reason, it will return a non-zero exit code and Delphi will just report that the build has failed. The build tool will write to stdout and stderr in case of any errors, but those do not show up in the Messages window:

  • the Build tab just shows Failed (after brcc32 is run)
  • in the Output tab I can see that
    • the target BuildVersionResource is run, then the target PreBuildEvent is run
    • then my custom pre-build event is run (here I can also see what it writes to stdout) - this also succeeds
    • and then I only see: Build FAILED - but I see nothing related to the custom build tool

How can I fix this, or where can I find detailed help for custom build tools? The Delphi IDE help is really very basic.

Here's the full Output tab text as reference:

Build started 19/03/2015 14:57:44.
__________________________________________________
Project "C:\Xxx\Xxx.dproj" (Build target(s)):
Target BuildVersionResource:
    c:\program files (x86)\embarcadero\rad studio\10.0\bin\cgrc.exe -c65001 Xxx.vrc -foXxx.res 
    CodeGear Resource Compiler/Binder
    Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.

    Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

    Copyright (C) Microsoft Corporation.  All rights reserved.


    Deleting file "Xxx.vrc".
Build FAILED.
    0 Warning(s)
    0 Error(s)
Time Elapsed 00:00:00.82

来源:https://stackoverflow.com/questions/29146646/how-do-i-report-error-messages-to-the-ide-from-a-custom-build-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!