0

When building a BCB6 project on the command line via MAKE Version 5.2 running Borland C++ 5.6.4 (seemingly including a run of Borland Delphi Version 14.0), I'm getting these warnings:

syncmeth.pas(57) Warnung: Symbol 'AllocateHWnd' wird abgelehnt

syncmeth.pas(62) Warnung: Symbol 'DeallocateHWnd' wird abgelehnt

Several web searches for the German phrase didn't provide any useful results. Then I tried to translate it, starting with things like

Warning: symbol 'AllocateHWnd' [is/was] denied

with just as little success. Finally I tried without the verb

warning symbol 'AllocateHWnd'

and found something promising: a lot of search results matching the pattern

Symbol '<whatever>' is deprecated.

But the German abgelehnt means denied and definitely not deprecated (which means veraltet as usually translated in the software development domain).

Can anybody confirm that this is only a translation error, so that I can just ignore the warnings (of course aware what deprecated means)?

Wolf
  • 9,679
  • 7
  • 62
  • 108
  • Maybe from the area where names longer than 8 letters were truncated (and case insensitive)? ALLOCATE might have been reserved. If I am right, I take a day off. – Joop Eggen Jul 06 '16 at 11:15
  • @JoopEggen This I doubt. Delphi and Borland C++ both allow long identifiers since they exist. And it's the same for `DeallocateHWnd`. I'm directly using these functions, and I had never issues with them. The problem in the given case is that I'm using a Delphi source file in a C++Builder project *and* in a Delphi project. – Wolf Jul 06 '16 at 11:40

1 Answers1

2

A Google search of that exact German phrasing reveals the following discussions:

Strange Warning in D6 (need some help)

AllocateHWnd - Compiler-Warnung? (English translation)

Despite the German phrase "wird abgelehnt" translating as "is denied" or "is rejected" in the traditional sense, the warning messages in question actually DO mean deprecated in this situation.

The AllocateHWnd() and DeallocateHWnd() functions originally resided in the VCL's Forms unit. Their implementation was moved to the RTL's Classes unit in Delphi/C++Builder 6 (to support the CLX framework in Kylix), and the existing functions in the Forms unit were marked as deprecated (they were finally removed from the Forms unit in Delphi/C++Builder 2009).

So, the only way you can be getting those warnings in your project is if your syncmeth.pas file is calling the deprecated functions in the Forms unit instead of calling the newer functions in the Classes unit.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • I see, I'll have a closer look at it soon, thanks a lot. There is a detail I remember only now: I first wrote and tested the solution with Lazarus, then "ported it back" to D4, then used it also in BCB6. Maybe VCL and LCL are different here... – Wolf Jul 06 '16 at 20:14
  • Whatsoever, your explanation is completely plausible. ...and sufficient ;) – Wolf Jul 06 '16 at 20:25