You are not logged in.
Pages: 1
Gentlefolk,
Environment: Linux mint 19.1, Laz/FPC 1.8.4/3.0.4. And a lot of libraries......
Mormot 1.18 (from the readme.txt file).
I have been trying to compile the 'Notes' example from 'Taming the Mormot'
The code compiles but fails when linking. Using 'LazBuild' I find the following error/s:
(3104) Compiling NoteORM.pas
(9015) Linking project1
/home/iru/Downloads/mORMot-master/static/x86_64-linux/sqlite3.o: In function `pthreadMutexTry':
sqlite3.c:(.text+0x9d55): undefined reference to `pthread_mutex_trylock'
..
..
/home/iru/LazProjects/Morm2/project1.lpr(45,1) Error: (9013) Error while linking
/home/iru/LazProjects/Morm2/project1.lpr(45,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
So whats the problem? More missing modules/libraries???? Missmatch between fpc and Mormot???
Any ideas, direction, fixes appreciated, Ian
Offline
Perhaps the below will help.
Add this into your lpr file:
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
.....
Offline
Thank you for your response.
Your suggestion is correct I had missed that ' UseCThreads' was false and therefore 'cthreads' was not included.
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
The program now compiles/links successfully but currently crashes around line 58205 in mORMot.pas
result := aImplementationClass.GetInterfaceEntry(aInterface^.InterfaceGUID^);
if result=nil then
raise EInterfaceResolverException.CreateUTF8('%.RegisterGlobal(): % does not implement %', <<<<<< Fails here!
[self,aImplementationClass,aInterface^.Name]);
I will battle on.....
Slightly horrified to find over 62000 lines of code and comments in mORMot.pas.
Ian
Offline
You should rather add in the beginning of your .lpr file:
program MyProg;
{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
uses
{$I SynDprUses.inc} // includes FastMM4 (Delphi 7) or cthreads (FPC-Linux)
SynLZ,
SynCommons,
...
Note that {$I Synopse.inc} in the beginning of every of your unit is a good idea.
About your problem, the message is pretty clear: your class doesn't implement the interface it tries to publish...
I guess you need to correct your code.
Offline
Pages: 1