Topic: lazarus and sqlitepass in linux

Hi, thank you for your excellent component, I had used it in windows with great success, but unfortunately can't get it to compile in linux, I get as far as the sqlite3Api unit where it uses the Windows unit which is not recognised in linux and substituted the forms unit and get an error: identifier not found GetProcAddress. This is without going further into compilation.

Re: lazarus and sqlitepass in linux

Hi Dave

I didn't test the compile process with Linux because I don't have any computer available with this OS right now...
I'm working on version 0.31 that should solve many memory leaks and gives more databases support.
It should be ready in a couple of weeks and it would be great if we could solve some Linux issues.

GetProcAddress is used to load the external library functions. I try to find out how it should be set with Linux.

Re: lazarus and sqlitepass in linux

Thank you LuckyLazarus looking forward to helping where I can

Re: lazarus and sqlitepass in linux

Ok Dave.

I'm still writing and modifying version 0.31 but I don't have too much time for it.
I will post a pre-release (0.31a) in about two weeks, so you will be able to check it with Linux.

Best Regards
Luc

Re: lazarus and sqlitepass in linux

Dave,

I guess you know version 0.31a is ready for download.

It should compile under linux and install properly in lazarus but I couldn't test it with sqlite library. I need help.

I didn't find out how to compile the sqlite library with the SQLITE_ENABLE_COLUMN_METADATA to include the following functions

sqlite3_column_database_name
sqlite3_column_database_name16
sqlite3_column_table_name
sqlite3_column_table_name16
sqlite3_column_origin_name
sqlite3_column_origin_name16
sqlite3_table_column_metadata

in the sqlite library 

Could you tell me the best way to achieve this under unbuntu ?

Thanks

Luc

Re: lazarus and sqlitepass in linux

Hi LuckyLazarus, I just compile the sqlite.c like this gcc -c sqlite3.c and that gives the library for linux which becomes the file sqlite3 (no extension) and is treated as library. I have had no problem this way, unfortunately I do not know enough about the sqlite structure to give specific guidance to your problem, just installed the new version, still have to test it, no problem with the install. Ok I tried to use the demo, but the database component will not connect at all, tried with your demo and several of the test database but the connect property will not activate.

Last edited by davesimplewear (2008-01-07 22:51:26)

Re: lazarus and sqlitepass in linux

Thanks for your answer.

The connection to the library is ok under win32. I tried to use the components under linux with the same problem as yours.
I used gcc -c sqlite3.c to compile the library. gcc generates a sqlite3.o file.
I first thought this file was not correct to be used as a library.
maybe I should  try to ask the linker (ld) to generate a shared library.

I will test it later.

What is the best location to place a shared library under linux (like ../windows/system32) ?

Regards.
Luc

Re: lazarus and sqlitepass in linux

luckylazarus wrote:

Thanks for your answer.

The connection to the library is ok under win32. I tried to use the components under linux with the same problem as yours.
I used gcc -c sqlite3.c to compile the library. gcc generates a sqlite3.o file.
"Just rename the sqlite3.o file to sqlite3 with no extension, it can then be used as library"

I first thought this file was not correct to be used as a library.
maybe I should  try to ask the linker (ld) to generate a shared library.

I will test it later.

What is the best location to place a shared library under linux (like ../windows/system32) ?

There are a couple of places that I believe could be used " usr/share/lib or usr/lib" it depends on what distro you use, I am using ubuntu gutsy gibbon (7.10)

Regards.
Luc

The above info about the sqlite3 library I found on the internet in a tutorial and this a direct quote "copy the library "sqlite3.so" into the same folder from code and rename it into "sqlite3"." which means if you had the library in the same folder as your component you wouldn't have to worry about linking or placing in user folders, I run lazarus in my home folder rather than the default install so I don't have to worry about being root to use it and can install and remove components with ease and use GTK2 without any problems and the applications look nicer (a bit like win95/98 against xp).

Last edited by davesimplewear (2008-01-10 09:27:32)

Re: lazarus and sqlitepass in linux

Hello Dave,

I've just made a quick tutorial on how to compile the sqlite library under ubuntu/linux (link on the main page of the website).

Version 0.31b is now available and should work with Lazarus/Linux.

Please check this if you want.

I've got to go to work.

See you later.

Luc