How to use external dll?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

How to use external dll?

Post by Rathinagiri »

Hi friends,

I want to know how to use the dll files instead of using static libraries.

Let me tell my use case.

I have the latest sqlite3.dll file. Instead of using the libsqlite3.a, how to use the external sqlite3.dll file? I am not bothered to send my application along with this dll file.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
gfilatov
Posts: 1090
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: How to use external dll?

Post by gfilatov »

Rathinagiri wrote: Fri May 19, 2023 4:01 am Hi friends,

I want to know how to use the dll files instead of using static libraries.
...
how to use the external sqlite3.dll file?
Hi Rathinagiri,

Please take a look at the attached Sqlite example for HMG 3.6 (64-bit). :arrow:
The archive contains the necessary sources, dll and make files along with a working executable file.
Note that you must copy the libsqlite3.a library file to your \hmg.3.6\harbour64\lib\win\mingw64\ folder
as a first step to correctly compile this example. :idea:
Attachments
sqlite-dll-64.zip
(2.7 MiB) Downloaded 238 times
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use external dll?

Post by Rathinagiri »

Thank you very much for the sample Grigory. This is how I use it as of now for all my applications.

What I am asking is exactly opposite of this. ie., is there anyway to avoid libsqlite3.a and use the dll file instead? Like libmysql.dll
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
gfilatov
Posts: 1090
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: How to use external dll?

Post by gfilatov »

Rathinagiri wrote: Fri May 19, 2023 4:52 pm This is how I use it as of now for all my applications.

What I am asking is exactly opposite of this. ie., is there anyway to avoid libsqlite3.a and use the dll file instead? Like libmysql.dll
Dear Rathi,

I seem to have expressed myself unclearly. :(

The provided library libsqlite3.a is similar to libmysql.dll. It was compiled using a batch file def2lib.bat.

Just try to run the application without sqlite3.dll in the same folder. :arrow:
And you will see a missing DLL error message.
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use external dll?

Post by Rathinagiri »

Wow! You are so great Grigory! Thanks a lot!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use external dll?

Post by Rathinagiri »

Thanks to Grigory's guidance, now, we can use SQLCipher latest version (3.4.2) to safely encrypt our entire database!

Attached is the required .dll and .a files for latest HMG 64bit!
Attachments
sqlcipher.zip
(3.94 MiB) Downloaded 252 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
serge_girard
Posts: 3309
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: How to use external dll?

Post by serge_girard »

Thanks Rathi & Grigory !
There's nothing you can do that can't be done...
User avatar
Anand
Posts: 596
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: How to use external dll?

Post by Anand »

Thanks both for your efforts for HMG 64 bit
Regards,

Anand

Image
Post Reply