#1 2016-01-26 15:53:20

oerjann
Member
From: Norway
Registered: 2016-01-22
Posts: 7
Website

Can't compile sample projects

Hi!

I want to try out the mORMot Framework, and just downloaded mORMotNightlyBuild.zip. I was thinking that running the sample programs would be a good place to begin. The problem is that I can't compile them. Delphi 10 Seattle can not compile Synlog.pas. I'm trying to compile the project in SQLite3/Samples/MainDemo:

[dcc32 Error] SynLog.pas(1665): E2250 There is no overloaded version of 'AddDynArrayJSON' that can be called with these arguments

procedure TSynMapFile.SaveToJson(W: TTextWriter);
begin
  W.AddShort('{"Symbols":');
  W.AddDynArrayJSON(fSymbols);
  W.AddShort(',"Units":');
  W.AddDynArrayJSON(fUnits);
  W.Add('}');
end;

Offline

#2 2016-01-26 17:49:43

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,220
Website

Re: Can't compile sample projects

I have no problem to compile and run SynFile.dpr with Delphi 10 Seattle using 1.18.2306.
From the IDE About box:

Embarcadero® Delphi 10 Seattle Version 23.0.20618.2753 

Did you try to make a full rebuild?

Offline

#3 2016-01-27 14:17:30

oerjann
Member
From: Norway
Registered: 2016-01-22
Posts: 7
Website

Re: Can't compile sample projects

Doh! I figured out my problem, totally my fault. We have been using synpdf for a couple of years. For that reason I have both a mORMot directory and a synpdf directory in my library path, both directories containing SynCommons.pas. The syndpdf directory contains an outdated version of SynCommons.pas and is listed before the mORMot directory.

PS. I can see from your about box that you have not installed Update 1 for Delphi 10 Seattle.

Offline

#4 2016-01-27 14:44:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,220
Website

Re: Can't compile sample projects

Yes, I did not want to go through a full re-install, whereas I do not use any of the features of Delphi 10 Seattle.
For Win64, I use my good old XE8...

Offline

#5 2016-02-04 18:32:29

oerjann
Member
From: Norway
Registered: 2016-01-22
Posts: 7
Website

Re: Can't compile sample projects

I don't now if you want to keep all the sample projects to compile with the default OBJFPC compiler mode. But if you do, I can inform you that example 26 do not compile with this mode because
parameters in class methods cannot have the same names as class properties in this mode. See http://www.freepascal.org/docs-html/pro … gse62.html

Offline

Board footer

Powered by FluxBB