After weeks, I still cannot get the Platform prefixes work

I have been fighting weeks with 10.2. First it took days to get an extension from Account Management do re-install.

But especially this problem is a roadblock for me.
When importing my old delphi units i got compilers errors lice undeclared Dialogs, undeclared Graphics, etc.
So I went to the task of modifying my own units with
{ifdef VER320
  vcl.dialogs, ....
  dialogs, graphics...

That worked. But I got quite a few 3rd pary codce like Mormot, Nexus etc. And I do not see how I can change all of that code
in the same way.

And then I fond something even stranger.In a mormot file i have this:
  Windows, Messages, SysUtils, Classes, Contnrs,
  {$ifdef GDIPLUSDRAW}
  Graphics, Controls, Dialogs,

Well, it does not give me an error on Messages, Syutils etc . even though there is no System. prefix,
but it gives me an error on Graphics.

In the Unit scope of the project I have
Value from all configurations All Platforms

Value from all configurations 32-bit Windows Platform
It seems OK, but why do I need then to apply the vcl., system. etc. prefixes myself?
I am totally lost.

  • The English language usually makes it difficult to understand the questions, let's see if I understand. The units have earned in their name the part that identifies the family, like us.

    However, in previous editions this had not been thought of, and in order not to harm the millions of users (developers), it was defined that the system could identify the procedures used through the use of "aliases" and thus allow a code to be compiled. in multiple IDEs without the need to rename units. So today you compile a Delphi1 unit into the most current version of the IDE simply by taking care to program independently of the IDE.

    And for that you can use the "COMPILATION DIRECTIVES" and the "ALIASES", "NAMESPACE" ...

    Now you must remember that today's application can be targeted to 3 or 4 different "PLATFORMS" so the complexity has increased exponentially.

    Check your project to see if the definitions have been defined in a standard way (one for each platform) or in a deorned way, ie one overwriting the other.

    Typically, you define "ALL CONFIGURATION > ALL PLATFORM" and then the other platforms in order of use, as they always "inherit" from the general definition (the first), but may have their own definition.

    So check this point.

    The IDE creates the files needed to compile your project, so if you look in HELP at the files that are created by your IDE.

    If you "delete" the .DPROJ files you will be deleting the custom settings and the IDE will re-create them with your IDE's default settings.

    So you can recreate the definitions again more clearly. Understood?


    {ifdef VER320
      vcl.dialogs, ....
      dialogs, graphics...

    USE  THE OPTIONS ON DPR --> Project Options -> Unit Name Scope

Reply Children
No Data