1 (edited by scorpio810 2023-11-07 12:49:37)

Topic: Use QT Creator to build qelecotech source code under windows

hello,
I downloaded the source code of qelectroTech0.9 version from the official website
and used QT Creator5.15.2 to open the qelectrotech.pro file for compilation when this problem occurred:

:-1: error: Project ERROR: sqlite3 development package not found.
According to the instructions in the forum <Building QET from source - sqlite3 development package not found>, compile the path of sqlite3 and add it to the directory of the pro file,
and then add the path to the pro file. The test still lacks sqlite3.

so I define it by : #DEFINES += QET_EXPORT_PROJECT_DB, and ,#unix|win32: PKGCONFIG += sqlite3.

Then this happens again when you rebuild: :-1: error: Project ERROR: Unknown module(s) in QT: KWidgetsAddons KCoreAddons.

i found another article on the forum <How can i build in Windows QTcreator: KwidgetAddons KcoreAddons> post, because I am a new graduate, the windows compilation is not familiar, according to the above instructions I have been unable to compile, may I ask how can I build KWidgetsAddons KCoreAddons in QT? Or is there a more detailed way?

Re: Use QT Creator to build qelecotech source code under windows

https://qelectrotech.org/forum/viewtopi … 999#p12999
https://qelectrotech.org/wiki_new/doc/qt_pour_windows

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

3 (edited by 云中君 2023-11-07 11:15:00)

Re: Use QT Creator to build qelecotech source code under windows

@scorpio810:
It is my great honor to receive your reply.
I followed the link instructions you sent to operate step by step. But, this problem occurred every time, and I did not know what was wrong. Could you please tell me in detail?
Error message:

D:\QET_Chinese\kcoreaddons-master\build>cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=D:\QT\Tools\Tools\mingw730_64\x86_64-w64-mingw32\lib\libz.a

-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: D:/QT/Tools/Tools/mingw730_64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: D:/QT/Tools/Tools/mingw730_64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--

CMake Error at D:/CMake/share/ECM/modules/ECMQueryQt.cmake:84 (message):
  No executable found.  Can't check QT_INSTALL_PREFIX as required
Call Stack (most recent call first):
  D:/CMake/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
  D:/CMake/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
  CMakeLists.txt:14 (include)


-- Configuring incomplete, errors occurred!
See also "D:/QET_Chinese/kcoreaddons-master/build/CMakeFiles/CMakeOutput.log".

Re: Use QT Creator to build qelecotech source code under windows

Hello,

CMake Error at D:/CMake/share/ECM/modules/ECMQueryQt.cmake:84 (message):
  No executable found.  Can't check QT_INSTALL_PREFIX as required


maybe you forgot to enter in your terminal before this command:
SET QTPATH=C:\Qt\5.12.4\mingw73_64

But I saw you have Qt5 installed  on D:/QT ?? maybe correct your SET with good path and correct the Qt version and also minGW version?
SET QTPATH=D:\QT\5.12.4\mingw73_64

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

Re: Use QT Creator to build qelecotech source code under windows

It's more easy to compile on Linux, like Ubuntu/Debian if you know?

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

6 (edited by 云中君 2023-11-07 12:33:43)

Re: Use QT Creator to build qelecotech source code under windows

hello,
After I corrected the Qt and minGW versions according to the instructions,
after I changed QTPATH in the environment variables, the 5.12.4 folder was automatically generated in my Qt installation directory.But,the above question still arises.
I'm not familiar with LInux and I think the probability of error is probably a little higher.

Re: Use QT Creator to build qelecotech source code under windows

cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=D:\QT\Tools\Tools\mingw730_64\x86_64-w64-mingw32\lib\libz.a


Hmm try:

cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=D:\QT\Tools\mingw730_64\x86_64-w64-mingw32\libz.a

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

Re: Use QT Creator to build qelecotech source code under windows

A question: why do you want to compile yourself QElectroTech, we offert a lot of packages here?

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

9 (edited by 云中君 2023-11-08 09:26:57)

Re: Use QT Creator to build qelecotech source code under windows

The reason why the source code is compiled,because I added some pictures and colors to the source code according to the work requirements.But,After modifying the code the QT compiler keeps telling me it's missing Project ERROR: Unknown module (s) in QT: KWidgetsAddons KCoreAddons.

Re: Use QT Creator to build qelecotech source code under windows

rename D:\QT\5.12.4\mingw73_32\lib\libKF5CoreAddons.dll.a to libKF5CoreAddons.a
rename D:\QT\5.12.4\mingw73_32\lib\libKF5WidgetsAddons.dll.a to libKF5WidgetsAddons.a

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

Re: Use QT Creator to build qelecotech source code under windows

TRY to copy your  KWidgetsAddons KCoreAddons. mkspecs/modules/*.pri  to D:\QT\5.15.2\mingw73_32\mkspecs\modules\

After in D:\QT\5.15.2\mingw73_32\mkspecs \modules\

edit  KWidgetsAddons KCoreAddons pri files like :
https://invent.kde.org/sdk/kdesrc-build … note_53888

Replace "$$PWD/../../" by real PATH in KWidgetsAddons KCoreAddons pri

See my example on OSX,
https://qelectrotech.org/wiki_new/doc/macosx

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

12 (edited by 云中君 2023-11-08 11:30:34)

Re: Use QT Creator to build qelecotech source code under windows

Sorry to disturb you.
I installed QT according to the instructions you gave.But,me didn't find it in my installed QT directory:libKF5CoreAddons.dll.a,
KWidgetsAddons KCoreAddons. mkspecs/modules/*.pri..I haven't been able to locate it.Can you please tell us more about it?

Re: Use QT Creator to build qelecotech source code under windows

====== Installing development tools for Microsoft Windows======
===== Install Qt: =====
Follow the instructions in this https://guillaumebelz.github.io/qtinstall in order to correctly install Qt

Create the QTPATH environment variable. For that :
Go to the Windows control panel, in the search bar type 'environment variable', in the result go to 'Modify system environment variables', in the dialog click on 'Environment variable' in the new dialog in 'system variable' click on 'new'.

Variable name:

QTPATH

value of the variable:

C:\Qt\5.15.0\mingw81_64

The path will need to be adapted according to your case.

Add minGW to the PATH environment variable, to do this:

Go to the Windows control panel, in the search bar type 'environment variable', in the result go to 'Modify system environment variables', in the dialog click on 'Environment variable' in the new dialog in 'system variable' select the 'Path' line then click on modify. In the 'Variable value' field add at the end

;C:\Qt\Tools\mingw810_64\bin\

the path will have to be adapted according to your case.
===== Installing cmake =====
Download the installer from the https://cmake.org/install/

During installation if you are asked to add cmake to the PATH do so (for all users) otherwise you will have to manually add the cmake bin folder to the PATH, see the procedure above. The path will be something like ''C:\Program Files\CMake\bin''.
===== ECM =====
The procedure used comes from this https://qelectrotech.org/forum/viewtopi … 120#p10120

Download https://github.com/KDE/extra-cmake-modules then unzip it to the folder of your choice.
In a command guest:

cd (path of ecm)
cmake -DCMAKE_INSTALL_PREFIX=%QTPATH% -G "MinGW Makefiles"
mingw32-make install



Compile KwidgetAddons and KcoreAddons (libraries used by QElectroTech)
The procedure used comes from this forum post and this one.

KCoreAddons
https://github.com/KDE/kcoreaddons
Download KCoreAddons and unzip it to the folder of your choice. In a command guest:

cd (path of kcoreaddons)
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw810_64\x86_64-w64-mingw32\lib\libz.a
mingw32-make
mingw32-make install

the path C:\Qt\Tools\mingw810_64\x86_64-w64-mingw32\lib\libz.a must be adapted according to your case.

Rename C:\Qt\5.15.0\mingw81_64\lib\libKF5CoreAddons.dll.a to libKF5CoreAddons.a (Path to adapt according to your case).

KWidgetAddons
https://github.com/KDE/kwidgetsaddons
Download KWidgetAddons and unzip it to the folder of your choice. In a command guest:

cd (kwidgetsaddons path)
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=%QTPATH% -DCMAKE_PREFIX_PATH=$QTPATH -G "MinGW Makefiles" -DZLIB_LIBRARY:FILEPATH=C:\Qt\Tools\mingw810_64\x86_64-w64-mingw32\lib\libz.a
mingw32-make
mingw32-make install

the path C:\Qt\Tools\mingw810_64\x86_64-w64-mingw32\lib\libz.a must be adapted according to your case.

Rename C:\Qt\5.15.0\mingw81_64\lib\libKF5WidgetsAddons.dll.a to libKF5WidgetsAddons.a (Path to adapt according to your case).

Retrieve QElectrotech sources with git
Install git for windows.

Download the code from the github repository https://github.com/qelectrotech/qelectr … rce-mirror

git clone https://github.com/qelectrotech/qelectrotech-source-mirror.git
cd qelectrotech-source-mirror.git
git submodule update --init --recursive
mkdir build
cd build
qmake ..\qelectrotech.pro
make -j8

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

Re: Use QT Creator to build qelecotech source code under windows

I had this problem when compiling KCoreAddons:
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Qt/Tools/mingw810_64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Qt/Tools/mingw810_64/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--

CMake Error at C:/Qt/5.15.2/mingw81_64/share/ECM/modules/ECMQueryQt.cmake:84 (message):
  No executable found.  Can't check QT_INSTALL_PREFIX as required
Call Stack (most recent call first):
  C:/Qt/5.15.2/mingw81_64/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
  C:/Qt/5.15.2/mingw81_64/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
  CMakeLists.txt:14 (include)


-- Configuring incomplete, errors occurred!
See also "D:/QET_Chinese/kcoreaddons-master/build/CMakeFiles/CMakeOutput.log".

Re: Use QT Creator to build qelecotech source code under windows

Maybe send D:/QET_Chinese/kcoreaddons-master/build/CMakeFiles/CMakeOutput.log".

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

Re: Use QT Creator to build qelecotech source code under windows

Do you mean that I send you the contents of the CMakeOutput.log file?

Re: Use QT Creator to build qelecotech source code under windows

https://api.kde.org/ecm/module/ECMQueryQt.html

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

Re: Use QT Creator to build qelecotech source code under windows

https://github.com/KDE/extra-cmake-modu … .cmake#L30

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

Re: Use QT Creator to build qelecotech source code under windows

include(ECMQueryQt)
ecm_query_qt(bin_dir QT_INSTALL_BINS)
These two lines of code are at the beginning of the CMakeList.txt file in the kcoreaddons-master directory.This error occurs:
CMake Error at CMakeLists.txt:1 (include):
  include could not find load file:

    ECMQueryQt


CMake Error at CMakeLists.txt:2 (ecm_query_qt):
  Unknown CMake command "ecm_query_qt".


-- Configuring incomplete, errors occurred!

Re: Use QT Creator to build qelecotech source code under windows

Hum, I think you do download KF5 branch for all, not master branch, I think master it is for Qt 6 version..
KF5 version to 5.112.0.

https://invent.kde.org/frameworks/extra … type=heads
https://invent.kde.org/frameworks/kcore … type=heads
https://invent.kde.org/frameworks/kwidg … type=heads

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

Re: Use QT Creator to build qelecotech source code under windows

It would be an honor for me to be able to help everyone.
However, according to your instructions, when compiling Qelecotech, because my source code is directly downloaded from github and modified, I skipped the git clone in your instructions https://github.com/qelectrotech/qelectr … or.git,git submodule update --init -- recursive
mkdir build. Go directly to the directory where qelectrotech is located and start the following steps:mkdir build,cd build.But,When I'm doing this step: qmake.. qelectrotech.pro, I get this error: 'qmake' is not an internal or external command, nor is it a runnable program
or batch files.

Re: Use QT Creator to build qelecotech source code under windows

I remember on Windows in list program Qt you have a terminal based on minGW, maybe try it..
Maybe
Edit the PATH where find qmake lile this:

\Qt\5.15.0\mingw81_64\bin\qmake ..\qelectrotech.pro

Or use this command with the right path in your terminal before using qmake command..

SET QTPATH=C:\Qt\5.12.4\mingw73_32

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

Re: Use QT Creator to build qelecotech source code under windows

hello,
I use it in the terminal:C:\Qt\5.15.2\mingw81_64\bin\qmake ..\qelectrotech.pro.This error occurred:Info: creating stash file D:\QET_Chinese\qelectrotech\build\.qmake.stash.

I think the reason for this error is that I made changes to the source code,And then,I take it from what you gave above [https://github.com/qelectrotech/qelectr … rce-mirror]

Downloaded a source code,Manually unzip it to a folder,Start the following command:
cd D:\QET_Chinese\qelectrotech;mkdir build;cd build;C:\Qt\5.15.2\mingw81_64\bin\qmake ..\qelectrotech.pro;

This error occurred:Info: creating stash file D:\QET_Chinese\qelectrotech-source-mirror-master\build\.qmake.stash
Cannot read D:/QET_Chinese/qelectrotech-source-mirror-master/SingleApplication/singleapplication.pri:
No such file or directory.
Could you tell me the detailed solution?

Re: Use QT Creator to build qelecotech source code under windows

If you download zip source code you don't have sub-modules, also please git to clone the repository.
https://www.reddit.com/r/github/comment … of_master/
https://github.com/dear-github/dear-github/issues/214

git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git

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

Re: Use QT Creator to build qelecotech source code under windows

https://gitforwindows.org/

Git BASH
Git for Windows provides a BASH emulation used to run Git from the command line. *NIX users should feel right at home, as the BASH emulation behaves just like the "git" command in LINUX and UNIX environments.

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