Topic: Building QET from source - sqlite3 development package not found

I am trying to build QElectroTech from source on Windows. I think I am almost there. However, I am stuck when running qmake, I get the following error

12:58:22: Starting: "C:\Qt\5.15.0\mingw81_64\bin\qmake.exe" C:\Users\Lucas\Development_qet\qelectrotech-source-mirror\qelectrotech.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
Project ERROR: sqlite3 development package not found
12:58:22: The process "C:\Qt\5.15.0\mingw81_64\bin\qmake.exe" exited with code 3.
Error while building/deploying project qelectrotech (kit: Desktop Qt 5.15.0 MinGW 64-bit)
When executing step "qmake"

Any idea how to fix this? This might of course also be a problem with my Qt installation.

Re: Building QET from source - sqlite3 development package not found

Project ERROR: sqlite3 development package not found

Install  sqlite3 development package, or in qelectrotech.pro

#comment the line below to disable the project database export
DEFINES += QET_EXPORT_PROJECT_DB

And comment :

unix|win32: PKGCONFIG += sqlite3

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Building QET from source - sqlite3 development package not found

We cross compil QElectroTech for windows on linux system, so we never build qelectrotech on windows.
The few time who I build Qet on windows, I comment the things related to sqlite3 (see the post of scorpio).

May be you can test this : https://gist.github.com/zeljic/d8b54278 … 169ee28c55

If they work for you, you can feedback to us how to ?

Développeur QElectroTech

4 (edited by lucas 2021-06-30 12:30:36)

Re: Building QET from source - sqlite3 development package not found

Thank you for your help @Joshua and @scorpio810

I am able to compile qet now by commenting out the lines in the qmake file and it seems to work. I had to add the "sqlite3.h" header file to the Qt include directory. Otherwise I would get the following error

projectdatabase.cpp:33: error: sqlite3.h: No such file or directory
..\qelectrotech-source-mirror\sources\dataBase\projectdatabase.cpp:33:10: fatal error: sqlite3.h: No such file or directory
 #include <sqlite3.h>

But fortunately there weren't any further compile or link errors after that.

I wasn't so far able to compile it with sqlite3. It seems like qmake tries to look for the "libsqlite3-dev" package, which I cannot install for windows. But I am not that familiar with the Qt build process to figure out where to adapt this. @Joshua I was able to build the sqlite3.lib file with the instructions you linked. It's just not so clear how to make the build process digest it. I will investigate this a little bit further and will let you know if i find a way to do it.

Re: Building QET from source - sqlite3 development package not found

Sqilte3 dependency is only for nomenclature database export to file function.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Building QET from source - sqlite3 development package not found

https://doc.qt.io/qt-5/sql-driver.html# … -and-above
https://forum.qt.io/topic/69835/why-can … on-enabled

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

7 (edited by lucas 2021-07-01 11:17:48)

Re: Building QET from source - sqlite3 development package not found

I get everything to compile now. It's not in particular nice how I do it. I add the path of the sqlite3.h file and the sqlite3.dll manually in the qmake file and remove the dependency on the sqlite3 development package for windows. I don't have to make any other changes to source files. It also works to statically link the sqlite3 library by just including the full flat sqlite3.c file into the project, but I liked this even less. If I find a better way, I'll let you know.

unix: PKGCONFIG += sqlite3 
win32: CONFIG += sql

win32:LIBS += "C:/<path>/sqlite3.dll"
win32:INCLUDEPATH += "C:/<path>"    #path to sqlite3.h header file

Re: Building QET from source - sqlite3 development package not found

Maybe you have better luck with cmake and Ninja?

https://qelectrotech.org/forum/viewtopi … 627#p14627

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Building QET from source - sqlite3 development package not found

May be we can just add the header and the dll of sqlite3 in a sub dir of QElectroTech and then write a relative path into qelectrotech.pro ?
Should the dll be created for each version of windows or the same dll work for every version of windows?

Développeur QElectroTech