#1 2012-08-20 10:08:05

h.hasenack
Member
From: Nijmegen, Netherlands
Registered: 2012-08-01
Posts: 173
Website

Trying to compiule mORMot into a package

As we use runtime packes for our plugin system, we require the mORMot to be compiled into a package.

I am trying to do this, but get stuck on
[DCC Error] E2201 Need imported data reference ($G) to access 'VarCopyProc' from unit 'SynCommons'

Reading help reveals I need to add
{$IMPORTEDDATA ON}
at top of the unit, butr no joy.

Maybe it is because the call to VarCopyProc is inside an assembler block?

SO ...
How do I get around this
What sources shpuld be in the mORMot package (minimal)
Obvously I'll need an sqlite package too... What sources go in there?

OT: Looking at these assembler blocks makes me feel a bit inconfident about a 64 bit version being avalable soon... What is to be expected just about when?

Regards - Hans

Offline

#2 2012-08-20 10:21:11

h.hasenack
Member
From: Nijmegen, Netherlands
Registered: 2012-08-01
Posts: 173
Website

Re: Trying to compiule mORMot into a package

Never mind. I found it in the Synopse.inc file.

{.$define USEPACKAGES}
{ define this if you compile the unit within a Delphi package
  - it will avoid error like "[DCC Error] E2201 Need imported data reference ($G)
    to access 'VarCopyProc' from unit 'SynCommons'"
  - shall be set at the package options level, and left untouched by default }

Hans

Offline

#3 2012-08-20 13:03:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,187
Website

Re: Trying to compiule mORMot into a package

About 64 bit version, almost all asm blocks have a "PUREPASCAL" equivalency in the code.
So it won't be a big issue.
See http://blog.synopse.info/post/2010/08/1 … s-compiler

For lower level, like the one used to debugging information retrieval in SynCommons.pas, it will be converted to row API calls.
See for instance http://synopse.info/fossil/info/275c27a721 (just committed a few minutes ago).

Offline

#4 2012-08-21 13:17:25

h.hasenack
Member
From: Nijmegen, Netherlands
Registered: 2012-08-01
Posts: 173
Website

Re: Trying to compiule mORMot into a package

Great!

Offline

#5 2013-03-20 06:16:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,187
Website

Re: Trying to compiule mORMot into a package

By the way, mORMot now compiles and run well in Win64 mode.
See http://synopse.info/forum/viewtopic.php?id=1153

Offline

Board footer

Powered by FluxBB