Jump to content

Recommended Posts

How to set Delphi compiler to stop with error on classes where unknown attributes were used (no appropriate units in the uses section)?

 

Delphi 10.3

Share this post


Link to post

I don't have my RAD Studio in English, so the translation might be off:

 

Project options -> Delphi Compiler -> Hints and Warnings -> Not supported language Features

 

You can set this from "True" to "Error" so the compilation will stop.

Share this post


Link to post
8 minutes ago, Jacek Laskowski said:

In previous versions of delphi I did so, in 10.3 it doesn't work, that's why I asked a question.

Please file a bug report.

Share this post


Link to post
7 minutes ago, Dalija Prasnikar said:

according to that there is supposed to be new warning so current behavior is fine, but I cannot see it nor turn it on. (except with compiler directives) 

Yes, my comment to Marcos post remained unheard. We should create a separate QP entry for that.

  • Like 1

Share this post


Link to post

There is no access to such a warning! In turn, the compiler directive does not work globally, but locally (per unit), so it is useless.

  • Like 1

Share this post


Link to post

In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler-W^UNKNOWN_CUSTOM_ATTRIBUTE

  • Thanks 2

Share this post


Link to post
1 minute ago, Uwe Raabe said:

In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler-W^UNKNOWN_CUSTOM_ATTRIBUTE

Arghhhh... who designs this stuff? Some warnings can be setup at one place, other in another... it is a mess...

  • Like 3

Share this post


Link to post
4 minutes ago, Dalija Prasnikar said:

Some warnings can be setup at one place, other in another.

That is only a workaround until the dialog allows setting it directly. The mentioned option is a last resort to tweak the command line parameters given to the compiler.

Share this post


Link to post
47 minutes ago, Dalija Prasnikar said:

If the things were done right in the first place we would not need workarounds.

If things were always done right in the first place neither the term bug nor the term workaround would exist.

  • Like 4
  • Haha 1
  • Sad 1

Share this post


Link to post
On 9/18/2019 at 1:27 PM, Uwe Raabe said:

In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler-W^UNKNOWN_CUSTOM_ATTRIBUTE

Thanks for tip!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×