Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2024-07

Getting started with SQLite with Lazarus on Linux Mint

13 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Arí Ricardo Ody

Hello!

I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory.

Would anyone help me, please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240710/dc1ff470/attachment.htm>

Reply by email

Jean SUZINEAU
to Arí Ricardo Ody

I think that usually you should have already (installed by apt) a symbolic link named libsqlite3.so pointing to libsqlite3.so.0.

You can try? to create the symbolic link with something like:

ln -s /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so

Reply by email

Mattias Gaertner
to Arí Ricardo Ody: Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module…
Ar? Ricardo Ody wrote 9 lines
Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory. Would anyone help me, please?

Have you tried installing libsqlite3-dev ?

Mattias

Reply by email

zeljko
to Arí Ricardo Ody: Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module…
Ar? Ricardo Ody wrote 10 lines
Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory. Would anyone help me, please?

For your development you must install libsqlite3-dev package also (not needed for runtime).

zeljko

Reply by email

Luca Olivetti
to Arí Ricardo Ody: Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module…

El 10/7/24 a les 12:59, Ar? Ricardo Ody via lazarus ha escrit:

Show quoted text 10 lines
Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory. Would anyone help me, please?

I suppose it's a debian derivative, so

sudo apt install libsqlite3-dev

Bye

Luca Olivetti Wetron Automation Technology https://wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007

Reply by email

Arí Ricardo Ody
to Jean SUZINEAU: I think that usually you should have already (installed by apt) a symbolic link named…

Hello friends!

I tried to install libsqlite3-dev and it gave an error during installation. As for the symbolic link suggestion, I ask in which directory I must be logged in to execute the creation of the symbolic link. I really need to know where I can get the library necessary to use slqite3 with Laazarus on Linux Mint. Where each module must reside for the Lazarus compilation to work.
It's such a simple database...
With Linux Mint I had left behind the idea that to do things on Linux you need to be an expert or have one nearby. But look at this problem. I can't use simple SQLite3...

On Wed, Jul 10, 2024 at 9:05?AM Jean SUZINEAU via lazarus <

Show quoted text 15 lines
wrote: I think that usually you should have already (installed by apt) a symbolic link named libsqlite3.so pointing to libsqlite3.so.0. You can try to create the symbolic link with something like: ln -s /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240710/01deccb1/attachment-0001.htm>

Reply by email

Jean SUZINEAU
to Arí Ricardo Ody

Le 10/07/2024 ? 21:46, Ar? Ricardo Ody via lazarus a ?crit?:

As for the symbolic link suggestion, I ask in which directory I must be logged in to execute the creation of the symbolic link.

The following command is written with absolute paths so it can be run from any current directory :

ln -s /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so

You will need to run it with root privileges, I don't know very well Linux Mint, but as it's based on Debian, I guess it works like in Ubuntu, where the prefered way to run a command with root privileges is to prefix your command with sudo (it will ask your password):

sudo ln -s /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so

in case of doubt, you can uses " ln -- help " to get the doc of ln.

Reply by email

Michael Van Canneyt
to Arí Ricardo Ody: Hello friends! I tried to install libsqlite3-dev and it gave an error during installation.
Ar? Ricardo Ody wrote 9 lines
Hello friends! I tried to install libsqlite3-dev and it gave an error during installation. As for the symbolic link suggestion, I ask in which directory I must be logged in to execute the creation of the symbolic link. I really need to know where I can get the library necessary to use slqite3 with Laazarus on Linux Mint. Where each module must reside for the Lazarus compilation to work. It's such a simple database...

It may be simple, but it is in fact a bad database for use with Pascal. It has no type safety.

With Linux Mint I had left behind the idea that to do things on Linux you need to be an expert or have one nearby. But look at this problem. I can't use simple SQLite3...

I use linux mint myself, and I use sqlite3 without problems.

Installing libsqlite3-dev as suggested is the correct solution.

That you get an error installing an sqlite package is not a problem of FPC or Lazarus.

It would be helpful if you can give us the error, maybe then we can help.

Alternatively, you yourself can create the symbolic link that is created by installing libsqlite3-dev.

The command as provided here in the mailing list is correct and can be executed in any directory, but must be executed by root:

sudo ln -s /usr/lib/libsqlite3.so.0 /usr/lib/libsqlite3.so

If that also does not work, please give us the error. Again, without detailed information it is not possible to help.

Michael.

Reply by email

John Landmesser
to Arí Ricardo Ody: Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module…
Ar? Ricardo Ody wrote 11 lines
Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory. Would anyone help me, please?

Sometimes good information can be foend if you ask:

https://gemini.google.com/

or

https://chatgpt.com/

?But double check in examples?test cases the answers, KI often tells bullshit.

For me it was sometimes useful !

John

Reply by email

Arí Ricardo Ody
to John Landmesser

Hey guys!

Yesterday I had the Linux Mint software updated on my machine. So I ran: sudo apt install sqlite3-dev
This time everything went well and I got this command to work. Then I set up a small Lazarus project that does INSERT in a test SQLite database and everything worked. Thank you to everyone who helped me with this.

Greetings

Ari Ricardo
Sao Paulo, Brazil

On Thu, Jul 11, 2024 at 9:16?AM John Landmesser via lazarus <

Show quoted text 40 lines
wrote: Am 10.07.24 um 12:59 schrieb Ar? Ricardo Ody via lazarus: > Hello! > > I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking > for a module ?libsqlite3.so? (without the quotes). I installed sqlite > on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my > SSD, and I also couldn't figure out which directory I should put it in > if I found it. At most I can find a module ?libsqlite3.so.0? in the > /usr/lib directory. > > Would anyone help me, please? > Sometimes good information can be foend if you ask: https://gemini.google.com/ or https://chatgpt.com/ But double check in examples test cases the answers, KI often tells bullshit. For me it was sometimes useful ! John -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240712/351bb5b0/attachment.htm>

Reply by email

Marco van de Voort
to Arí Ricardo Ody: Hello! I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module…

Op 10-7-2024 om 12:59 schreef Ar? Ricardo Ody via lazarus:

Show quoted text 10 lines
I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking for a module ?libsqlite3.so? (without the quotes). I installed sqlite on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my SSD, and I also couldn't figure out which directory I should put it in if I found it. At most I can find a module ?libsqlite3.so.0? in the /usr/lib directory. Would anyone help me, please?

An earlier reply of me got lost, probably something to do with sending it while tethered to a phone.

Most of the database headers have a way of overriding names from code, without recompiling FPC/Lazarus, this has been done to improve the longevity of FPC releases if things change in some new linux distribution(version)

Try to

-? include unit sqlite3dyn in your main (.lpr) program.

- as the first line of your .lpr (or at least before the application.* commands) add

tryinitializesqlite('libsqlite3.so.0');

Rinse, repeat, retry.

Reply by email

John Landmesser
to Marco van de Voort
Marco van de Voort wrote 23 lines
Op 10-7-2024 om 12:59 schreef Ar? Ricardo Ody via lazarus: > > I'm trying to use SQLite with Lazarus on a Linux Mint. It is asking > for a module ?libsqlite3.so? (without the quotes). I installed sqlite > on my linux with apt. I'm not finding ?libsqlite3.so? anywhere on my > SSD, and I also couldn't figure out which directory I should put it > in if I found it. At most I can find a module ?libsqlite3.so.0? in > the /usr/lib directory. > > Would anyone help me, please? > An earlier reply of me got lost, probably something to do with sending it while tethered to a phone. Most of the database headers have a way of overriding names from code, without recompiling FPC/Lazarus, this has been done to improve the longevity of FPC releases if things change in some new linux distribution(version) Try to -? include unit sqlite3dyn in your main (.lpr) program.

*Beware*:

[john1 at manjaro ~]$
/run/media/john1/ntfs1/PROJEKTE/Lazarus/Laufdaten/GUI/laufdaten Threading has been used before cthreads was initialized. Make cthreads one of the first units in your uses clause. Runtime error 211 at $0000000000435FDD
? $0000000000435FDD

Show quoted text 9 lines
- as the first line of your .lpr (or at least before the application.* commands) add tryinitializesqlite('libsqlite3.so.0'); Rinse, repeat, retry.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20240713/b58acdf6/attachment.htm>

Reply by email

Marco van de Voort
to John Landmesser

Op 13-7-2024 om 15:53 schreef John Landmesser via lazarus:

Show quoted text 10 lines
*Beware*: [john1 at manjaro ~]$ /run/media/john1/ntfs1/PROJEKTE/Lazarus/Laufdaten/GUI/laufdaten Threading has been used before cthreads was initialized. Make cthreads one of the first units in your uses clause. Runtime error 211 at $0000000000435FDD ? $0000000000435FDD

I never said the -dyn unit needed to be /first. /old rules still apply

Reply by email