#1 Re: PDF Engine » E2197 Constant object cannot be passed as var parameter » 2020-05-15 21:38:07

The problem I encountered was that my existing form name, fMain, conflicts with a constant in SynPdf {fAddGlyphFont: (fNone, fMain, fFallBack);}.

Removing the conflict allowed the program to compile.

My immediate fix was to change fMain to ffMain in SynPdf and then change the references to this variable as required.

#2 PDF Engine » E2197 Constant object cannot be passed as var parameter » 2020-05-13 04:54:47

Graham Lovell
Replies: 1

When I added SynPDF into my Delphi XE6 application, and after removing the define for USE_SYNZIP, I got this error in the compiler when it got to Application.CreateForm(TfMain, fMain);

  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TfBook, fBook);
  Application.CreateForm(TfMain, fMain);

If I remove SynPDF from the application, it goes away.

I removed the define for USE_SYNZIP because it gave me a compile error on unsatisfied forward declaration for memcpy and 3 other procedures. Removing this define was allowed in the notes to this define.

Board footer

Powered by FluxBB