#1 2015-03-17 15:06:06

ws
Member
Registered: 2015-03-17
Posts: 19

FPC - Example - 30 - MVC Server

I'm new to the group.

I used fpc 3.1.1 and 1.5 Lazarus, I downloaded here: https://vdebris.wordpress.com/lazarus-2-7-1-snapshot/
Zeos 7.2

I use windows (32) - compiling example: 30 - MVC Server introduced this error in the compilation:

SynDBZEOS.pas (1170.0) Fatal: Unexpected end of file

Could someone give help to do?

Offline

#2 2015-03-17 16:18:51

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

Re: FPC - Example - 30 - MVC Server

Does the native SQLite3 (without external DB) version of the sample work?

Offline

#3 2015-03-17 16:38:29

ws
Member
Registered: 2015-03-17
Posts: 19

Re: FPC - Example - 30 - MVC Server

the problem happens in the project "MainDemo" with this message: mORMoti18n.pas (2568.0) Fatal: Unexpected end of file

coincidentally both mORMoti18n.pas and SynDBZeos are commented, right?

sorry my english!

Offline

#4 2015-03-17 16:56:15

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

Re: FPC - Example - 30 - MVC Server

The MainDemo uses the VCL for its UI, so it NOT compatible with Lazarus.

Try MVCServer.dpr in sample 30.

Offline

#5 2015-03-17 18:18:51

ws
Member
Registered: 2015-03-17
Posts: 19

Re: FPC - Example - 30 - MVC Server

with MVCServer.dpr project have these errors:

MVCModel.pas(380,20) Error: Incompatible types: got "Pointer" expected "TPUtf8CharArray"
380,20 ====> fResults[f] := pointer(fFields[f]);


MVCModel.pas(387,36) Error: Incompatible types: got "PUTF8Char" expected "TPUtf8CharArray"
387,36 ====> fResults[r*fFieldCount+f] := P;

MVCModel.pas(541,80) Error: Incompatible type for arg no. 6: Got "<address of function(Pointer;Pointer):LongInt;Register>", expected "<procedure variable type of function(PUTF8Char;PUTF8Char):LongInt;Register>"
541,80 ====> AddSortedRawUTF8(tags,tagsCount,tagTable.GetU(r,meta_id),nil,-1,@StrIComp);


MVCModel.pas(579,77) Error: Incompatible type for arg no. 4: Got "<address of function(Pointer;Pointer):LongInt;Register>", expected "<procedure variable type of function(PUTF8Char;PUTF8Char):LongInt;Register>"
579,77 ====> pointer(tags),high(tags),tagTable.FieldBuffer(meta_id),@StrIComp);

Offline

#6 2015-03-17 18:34:05

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

Re: FPC - Example - 30 - MVC Server

We needed to set the proper Delphi compatibility compilation mode for FPC.
See http://synopse.info/fossil/info/d72d459a11

It now compiles (but won't work, due to missing RTTI for interfaces).

Offline

#7 2015-03-17 18:45:19

ws
Member
Registered: 2015-03-17
Posts: 19

Re: FPC - Example - 30 - MVC Server

Thanks !

Offline

Board footer

Powered by FluxBB