#1 2014-11-24 20:48:37

jkuiper
Member
Registered: 2014-11-24
Posts: 13

First time issues

I'm using mormot framework for the first time.
I'm running Lazarus 1.2.6 / FPC 2.6.4. on Windows Vista 32 bits.
Download the snaphot, sqlite obj files and the sqlitefpc from the website. Extract the files into c:\lazarus\mormot. Went to c:\lazarus\mormot\sqlite3 and loaded testsql.lpi into lazarus IDE. Built the files but comes with the error:

TestSQL3.dpr(169,1) Warning: Library fpc-win32\libkernel32.a not found, Linking may fail !
TestSQL3.dpr(169,1) Warning: Library fpc-win32\libgcc.a not found, Linking may fail !
TestSQL3.dpr(169,1) Error: Can't open object file: fpc-win32\libkernel32.a
TestSQL3.dpr(169,1) Error: Can't open object file: fpc-win32\libgcc.a
TestSQL3.dpr(169,1) Error: Undefined symbol: ___moddi3
TestSQL3.dpr(169,1) Error: Undefined symbol: ___divdi3
TestSQL3.dpr(169,1) Error: Undefined symbol: ___umoddi3
TestSQL3.dpr(169,1) Error: Undefined symbol: ___udivdi3
TestSQL3.dpr(169,1) Error: Undefined symbol: ___chkstk_ms
TestSQL3.dpr(169,1) Error: Undefined symbol: _LeaveCriticalSection@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _EnterCriticalSection@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _InterlockedCompareExchange@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _DeleteCriticalSection@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetCurrentThreadId@0
TestSQL3.dpr(169,1) Error: Undefined symbol: _InitializeCriticalSection@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _CloseHandle@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _TryEnterCriticalSection@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _AreFileApisANSI@0
TestSQL3.dpr(169,1) Error: Undefined symbol: _CreateFileA@28
TestSQL3.dpr(169,1) Error: Undefined symbol: _CreateFileW@28
TestSQL3.dpr(169,1) Error: Undefined symbol: _CreateFileMappingA@24
TestSQL3.dpr(169,1) Error: Undefined symbol: _CreateFileMappingW@24
TestSQL3.dpr(169,1) Error: Undefined symbol: _CreateMutexW@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _DeleteFileA@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _DeleteFileW@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _FlushFileBuffers@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _FormatMessageA@28
TestSQL3.dpr(169,1) Error: Undefined symbol: _FormatMessageW@28
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetCurrentProcessId@0
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetDiskFreeSpaceA@20
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetDiskFreeSpaceW@20
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFileAttributesA@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFileAttributesW@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFileAttributesExW@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFileSize@8
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFullPathNameA@16
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetFullPathNameW@16
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetLastError@0
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetSystemInfo@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetSystemTime@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetSystemTimeAsFileTime@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetTempPathA@8
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetTempPathW@8
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetTickCount@0
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetVersionExA@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _GetVersionExW@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapAlloc@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapCreate@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapDestroy@4
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapFree@12
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapReAlloc@16
TestSQL3.dpr(169,1) Error: Undefined symbol: _HeapSize@12
TestSQL3.dpr(169,1) Fatal: There were 50 errors compiling module, stopping

Searched on the internet and found that it's better to use sqlite3.dll for the first time. Just add the line {$define NOSQLITE3STATIC} in mormot.inc.
This built the files into a executable. Ran this and gave me this message

! Exception ESQLLite3Exeption raised with message:
! No SQLite3 library available: you shall either add SynSqlite3static to your project uses clause, either set sqlite3 := TSQLiteLibraryDynamic.create to load sqlite3.dll

Now I have a few questons:
How do I create static connection?
What is demo 1 in samples really doing? I can fill my name and a message, put on the button send message, but see nothing happens. But button 'find the previous message' gives the message not found.
Demo 2 can't find sqlite.dll. Put this in c:\windows\system32. Now it runs and I see the same as demo 1. But what does it do?

Offline

#2 2014-11-24 21:19:11

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

Re: First time issues

Welcome aboard!
We test FPC on 2.7.1 svn trunk mainly, but 2.6.4 has been reported to work for most part of the framework.

To let the static work, copy libkernel32.a and libgcc.a  from a mingw installation.
I've updated the sqlite3fpc.7z so that you would have those needed binary files.
Also for Linux.

To run with the sqlite3.dll, use

sqlite3 := TSQLite3LibraryDynamic.Create('sqlite3.dll');

or define NOSQLITE3STATIC and uses SynSQLite3Static.

Offline

#3 2015-03-07 06:29:32

vonH
Member
Registered: 2015-03-06
Posts: 17

Re: First time issues

I am cross compiling from Linux to Win32 and I am getting a simlar error

Is there some place to download these files?

Project02.lpr(57,1) Error: Can't open object file: fpc-win32/sqlite3.o
Project02.lpr(57,1) Error: Can't open object file: fpc-win32/libkernel32.a
Project02.lpr(57,1) Error: Can't open object file: fpc-win32/libgcc.a

I downloaded the sqlite3.7z file and  it contains sqlite3.obj and sqlitefts3.obj

Where can I get the files in the mingw installation?

If I want to use the dll approach which file will I add this line to -  sqlite3 := TSQLite3LibraryDynamic.Create('sqlite3.dll');

Last edited by vonH (2015-03-07 06:30:21)

Offline

#4 2015-03-07 09:54:49

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

Re: First time issues

You need to download the .o files as stated by the documentation at http://synopse.info/files/html/Synopse% … l#TITL_113

Offline

#5 2015-03-07 17:35:22

vonH
Member
Registered: 2015-03-06
Posts: 17

Re: First time issues

I have loaded them and triied to compile, but they are not being found. Which directories should  fpc-win32 and fpc-linux32 be copied to, as well as the mingw files after I obtain them?

Offline

#6 2015-03-07 17:42:47

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

Re: First time issues

As the doc states, in the root folder where mORMot was installed.

Ensure you uncompress them with their stored subfolders.

Offline

Board footer

Powered by FluxBB