You are not logged in.
Pages: 1
Hi,
I think a lot of us already had this error but I didn't find how to solve it.
When I compile with Windows, it works perfectly but with Linux, sometimes I have "Error: Error while linking".
So I don't know if it's a library problem or something else.
Thank you !
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
I never had this error.
You wrote that it occurred "sometimes"...
Pretty weird for a linking issue.
Try to recompile the .o using the .sh script, and change the .a files from our .7z using the files supplied with your distribution.
Offline
For example, the Sample 1 of SQLite3 is working well.
But here, I tried the 21st and he didn't compile.
I just re-executed the script. Same result ..
I found this error on the Internet but nothing interesting for my case
Last edited by Thomas-Acia (2015-04-17 09:04:14)
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
I can confirm this error.
When crosscompiling with CT5.3 from Windows to Linux ARM.
I will investigate further and report back.
Edit:
Happens also when compiling for Linux i386.
Common:
Static linking of (latest) sqlite gives this error.
Dynamic linking: all ok.
Last edited by AOG (2015-04-17 10:51:45)
Offline
Edit:
Happens also when compiling for Linux i386.
Yes, I tried to compile for Linux i386 too.
Common:
Static linking of (latest) sqlite gives this error.
Dynamic linking: all ok.
I resolved my problem !
I add this : {$DEFINE NOSQLITE3STATIC} at the top of Synopse.inc
So, when I include Synopse.inc, it's working well.
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
Found the problem AND the solution !
On Linux, with FPC / CT you need this for servers (because they use threads)
{$DEFINE UseCThreads}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
as first unit in your program uses statement !
Offline
... as written in the documentation...
Offline
Sure !
Can we cut a deal here ?
If you add this
{$ifdef FPC} // we may be on Kylix or upcoming Delphi for Linux
{$ifdef Unix} // we may also be on Darwin / OSX
// if you use threads: always needed for servers
cthreads,
// widestring manager if needed !!
// could also be put in another unit ... but doc states: as early as possible
cwstring, // optional
{$endif}
{$endif}
into all the server sample dpr files,
then I promise I will (try to) make the Lazarus lpi files for these samples to run out-of-the-box !
Offline
I've updated SynDprUses.inc to set cthreads and cwstring units for FPC
- also included SynDprUses.inc in all samples .dpr uses clause.
See http://synopse.info/fossil/info/af455043fb
I think it is the easiest to manage compiler-specific units at .dpr level.
Hope it helps!
Offline
Pages: 1