You are not logged in.
Reference for myself (and others might encounter the same issue in the future):
If you encounter the following error:
[dcc32 Error] E2201 Need imported data reference ($G) to access 'SUPERVISOR_ACCESS_RIGHTS' from unit 'mORMotHttpServer'
One of the reasons is because you are compiling a package which includes/uses a unit which in turn uses the `mORMot.pas' unit.
Solution
===
I have no solution yet. Maybe @ab has hints
Workaround
===
Just don't use the `mormot.pas` unit in your package...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Did you try what is documented at https://synopse.info/files/html/Synopse … #MNDX_2503 ?
(I just search for "package" in keyword index of the documentation)
So, perhaps try to use the USEPACKAGES conditional for this project.
Offline
the `USEPACKAGES` conditional was already in use
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
So I found a solution for this issue.
According to the document: E2201 Need imported data reference ($G) to access '%s' from unit '%s' (Delphi)
The solution is to add the units that are missing imported data reference to the build-first package (which has the {$IMPORTEDDATA ON} directive).
For example, the following error is what I got today:
[dcc32 Error] E2201 Need imported data reference ($G) to access 'crcblock' from unit 'SynCrypto'
[dcc32 Error] E2201 Need imported data reference ($G) to access 'FillcharFast' from unit 'mORMot'
The solution was to add both SynCrypto.pas and mORMot.pas to my package that's supposed to be built and installed first.
Last edited by edwinsn (2022-10-09 02:36:07)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
More info on this:
1. Related, earlier discussion in this forum
2. Wiert's notes on this issue
Last edited by edwinsn (2022-10-09 09:16:28)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
So the units are included twice?
No, just once, in the build-first package. As we know, a unit can only be included in one package.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline