Home > Back-end >  Where to put {$WARN DUPLICATE_CTOR_DTOR OFF}?
Where to put {$WARN DUPLICATE_CTOR_DTOR OFF}?

Time:04-05

I need to turn off this compiler warning because I don't intend to make my lib compatible with C .

If I put the compiler directive in the file that generates the warning, it is ignored.
People on the mighty internet say that should be placed in the DPR file. However, if I put it there, the IDE will delete it every time I change/save the project.

CodePudding user response:

Go to Project>Options>Building>Delphi Compiler>Hints and Warnings, select the platform and configuration, then set that warning to False. And Save. (Depending on your version of Delphi, the exact location of this setting might be different.) Screenshot of warning setting

  • Related