Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by nji »

utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by utelle »

nji wrote: Fri Jul 03, 2020 7:44 am The "strange order" of the build log message actually came from multitreaded building.
If I swith to 1 horse, the errors all belong to sqlite3.c and its use of (C++) pch etc.
Thanks for clarifying. From the log messages shown before it didn't become clear which compilation unit produced the error messages.
nji wrote: Fri Jul 03, 2020 7:44 am I hope there will still some help here although it's not a pure wxWidget problem,
but ... well? ... CB build system ...?
In fact, it's not a wxWidgets problem at all. Mixing C and C++ source files seems to cause the problems in conjunction with precompiled headers.

Unfortunately, I don't know Code::Blocks. Most likely there are compiler settings with which you can influence when and where to use precompiled headers. For example, you could try to add the switch "-DNOPCH" to the flags for the compilation of sqlite3.c.

However, my advice would be to separate the compilation of your wxWidgets application and that of SQLite into different (sub)projects. That way, you could build SQLite as a library which is only referenced from the linker when linking your application.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by ONEEYEMAN »

Hi,
Why not use precompiled sqlite library?
Or even wxSQLite?

Thank you.
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by nji »

Hi.
As I'm new to that matter I wanted to do it as simple as possible.

wxSQLite would be one more level of hierarchy.
And as the precompiled sqlite library there are no protoype/ header,
I don't know how to use it.
So I decided for amalgamtation sqlite.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by ONEEYEMAN »

Hi,
All you do is to grab a precompiled version, extract it (you should have both h and lib/dll) and then add it as a dependency.

Open project properties and add place where it was extracted to include path search and library path search.
Also add the lib file for the list of libraries.
Recompile.

Thank you.
nji
Earned a small fee
Earned a small fee
Posts: 22
Joined: Wed May 03, 2017 8:03 am

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by nji »

But if you have a look at the precompiled binaries for windows:
https://www.sqlite.org/download.html
There are only DLLs.
No headers, no libs.
???
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by utelle »

nji wrote: Fri Jul 03, 2020 1:27 pm But if you have a look at the precompiled binaries for windows:
https://www.sqlite.org/download.html
There are only DLLs.
No headers, no libs.
???
Someone who has an application which uses a SQLite DLL just needs the DLL to upgrade the application to a new version of SQLite. The application developer additionally needs the header files. In the case of SQLite the header files are included in the amalgamation package. So, a developer typically needs both, the amalgamation and the DLL.

The reason why SQLite does not provide any lib files is that each compiler produces his own format of lib files.

If you don't have experience in using SQLite for application development, you will be better off using wxSQLite3, most likely. Since SQLite is bundled with wxSQLite3 you have in fact only a dependency on a single library. IMHO there is not much difference, whether your application depends on SQLite or wxSQLite3.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by ONEEYEMAN »

Hi,
In addition to what Ulrich already said - SQLite is free of charge, but there are extensions which are cost money.
If you go with wxSQLite some of those extensions are included in there.

I am not sure if the license of wxSQLite approves the usage of them, but it is nice to at least be able to test the application with them prior to using it/ship it to the customers.

Thank you.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by utelle »

ONEEYEMAN wrote: Fri Jul 03, 2020 2:31 pm In addition to what Ulrich already said - SQLite is free of charge, but there are extensions which are cost money.
If you go with wxSQLite some of those extensions are included in there.
Among other extensions (like additional math functions) wxSQLite3 includes a SQLite encryption extension which is available free of charge. The "official" SQLite Encryption Extension offered by the SQLite developers costs money, 2000 USD to be precise. wxSQLite3's encryption extension supports several popular cipher schemes, namely SQLCipher, sqleet, System.Data.SQLite, and wxSQLite3 - selectable at runtime.
ONEEYEMAN wrote: Fri Jul 03, 2020 2:31 pm I am not sure if the license of wxSQLite approves the usage of them, [...]
Sure it does. wxSQLite3 and its encryption extension are licensed under the wxWidgets license.

Currently a new implementation of the encryption extension is under development as a separate project, SQLite3MultipleCiphers. The new implementation will support SQLite version 3.32.0 and later. wxSQLite3 will adopt this extension as soon as it is mature enough.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by ONEEYEMAN »

Ulrich,
I didn't know whether you{r team} did the development or you just acquire some license from official SQLite dev team.

Thank you for confirming.
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Problems building wxWidgets 3.0.5 and sqlite 3.31 (amalgamation)

Post by utelle »

ONEEYEMAN wrote: Fri Jul 03, 2020 3:25 pm I didn't know whether you{r team} did the development or you just acquire some license from official SQLite dev team.
The official SQLite encryption extension is a commercial product, to which I don't have access. Of course, I didn't reinvent the wheel, that is, most crypto algorithms used to implement the wxSQLite3 encryption extension are in the public domain. Detailed license information for all source files of the encryption extension can be found here.
Post Reply