如何强制Delphi编译器显示所有提示和警告 [英] How to force Delphi compiler to display all hints and warnings

查看:258
本文介绍了如何强制Delphi编译器显示所有提示和警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以强制Delphi编译器始终显示所有提示和警告?

Is there a way to force the Delphi compiler to display all hints and warnings all the time?

这是我目前在Delphi 6中看到的行为:

Here is the behavior that I am currently seeing in Delphi 6:


  1. 从源代码管理中签出我的应用程序的新副本

  2. 在Delphi和Compile中打开项目

  3. 将显示项目的所有提示和警告

  4. 以一个单位进行更改

  5. 编译

  6. 只显示已更改单位的提示和警告

  1. Check out fresh copy of my application from source control
  2. Open project in Delphi and Compile
  3. All hints and warnings for the project are displayed
  4. Make a change in one unit
  5. Compile
  6. Only the hints and warnings for the changed unit are displayed

所以,我想也许我可以通过删除所有 dcu 文件来强制Delphi重新编译所有内容,从而欺骗Delphi。没运气。实际上,编译器会重新编译所有单元,但不会显示这些单元的提示和警告。

So, I thought maybe I can trick Delphi by deleting all of the dcu files to force it to recompile everything. No luck. The compiler does in fact recompile all of the units, but does not display the hints and warnings for those units.

编辑: build(Project> Build)产生相同的不幸结果。

Performing a full build (Project > Build) yields the same unfortunate results.

新信息:如果我修改一个单元然后编译,我会收到警告。但是,如果我修改一个单元然后进行构建,则不会收到警告。我认为这表明警告已在某处关闭。可能在第三方库中?

NEW INFORMATION: If I modify a unit and then Compile, I get the warnings. However, if I modify a unit and then Build, I do not get the warnings. I'm thinking this points to warnings being turned off somewhere. Possibly in a third party library?

似乎应该有一种方法可以要求Delphi重新显示所有不需要我进行操作的提示和警告。从源代码管理中签出一份新副本,或者一个一个地修改每个单元。

It seems there ought to be a way to ask Delphi to re-display all of those hints and warnings that doesn't require me to either check out a fresh copy from source control or modify each unit one-by-one.

推荐答案

我将检查您是否已关闭某些单元中的警告。

在单位的最后更改上,编译顺序可以更改。在某些情况下,对于一段时间后编译的单元,警告可能会保持禁用状态,当刚从版本控制中退出时,它会在警告之前被编译。

请特别注意任何包含文件,您可以使用。

I would check to see if you turn the warnings off in some of your units.
Depending on the last change in the units, the compiling order can change. In some cases the warnings can remain disabled for a unit that is compiled after while, when freshly checked out of version control, it was compiled before, with the warnings.
Pay extra attention to any Include file you may use.

这篇关于如何强制Delphi编译器显示所有提示和警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆