#1 2016-01-20 16:23:22

dexter
Member
Registered: 2015-04-24
Posts: 53

TestSQL3 on FPC/trunk

Hi,

just downloaded FPC/trunk and the night build of mORMot.

FPC fails to compile TestSQL3 or any other (ex. Project04Server) under Win7 in default(win32) mode with many errors like:
TestSQL3.dpr(186,1) Error: Undefined symbol: __imp___endthreadex
TestSQL3.dpr(186,1) Error: Undefined symbol: __imp___beginthreadex

etc.

In linux mode is fine.
With previous FPC (stable) everything was OK.

What might be the reason?

Offline

#2 2016-01-20 20:31:21

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

Re: TestSQL3 on FPC/trunk

Are you sure you downloaded the latest static SQLite3 .o files from http://synopse.info/files/sqlite3fpc.7z ?

Please follow http://synopse.info/files/html/Synopse% … l#TITL_125

Offline

#3 2016-01-21 06:59:45

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: TestSQL3 on FPC/trunk

Can confirm ...
AFAIK, the problem is solved when some functions inside SynSQLite3Static.pas are declared forward.
Fpc trunk leaves/optimizes them out somehow ...
(@ab: see mail)

Offline

#4 2016-01-21 09:43:49

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

Re: TestSQL3 on FPC/trunk

Please try http://synopse.info/fossil/info/5db8673387

I identify it as a FPC regression for its internal linker.

Offline

#5 2016-01-21 10:11:13

hnb
Member
Registered: 2015-06-15
Posts: 291

Re: TestSQL3 on FPC/trunk

Maybe usage {$linklib c} for Windows can help?


best regards,
Maciej Izak

Offline

#6 2016-01-21 10:37:10

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

Re: TestSQL3 on FPC/trunk

I did not know about {$linklib c} but it sounds like if it is only for Linux.
See http://forum.lazarus.freepascal.org/ind … ic=15712.0

Offline

#7 2016-01-21 12:13:40

dexter
Member
Registered: 2015-04-24
Posts: 53

Re: TestSQL3 on FPC/trunk

After applying the patch #5db8673387, compilation is fine now.
Thanks.

Offline

Board footer

Powered by FluxBB