Solved Compiling Qt from Source on Windows - Error
-
Hi,
I conifgured as required and then ran qmake under qtbase/bin/ and ran "jom" again.
I was able to finish the build with the following output:
Updating 'qtxmlpatterns_it.qm'... Updating 'qtxmlpatterns_hu.qm'... Generated 37 translation(s) (37 finished and 0 unfinished) Ignored 443 untranslated source text(s) Generated 457 translation(s) (0 finished and 457 unfinished) Ignored 2 untranslated source text(s) call C:\Qt\Qt5.10\qttranslations\translations\lrelease_wrapper.bat qtxmlpatterns_ko.ts -qm qtxmlpatterns_ko.qm call C:\Qt\Qt5.10\qttranslations\translations\lrelease_wrapper.bat qtxmlpatterns_pl.ts -qm qtxmlpatterns_pl.qm Updating 'qtxmlpatterns_ja.qm'... Updating 'qtxmlpatterns_ko.qm'... Generated 480 translation(s) (480 finished and 0 unfinished) Generated 480 translation(s) (480 finished and 0 unfinished) call C:\Qt\Qt5.10\qttranslations\translations\lrelease_wrapper.bat qtxmlpatterns_ru.ts -qm qtxmlpatterns_ru.qm call C:\Qt\Qt5.10\qttranslations\translations\lrelease_wrapper.bat qtxmlpatterns_sk.ts -qm qtxmlpatterns_sk.qm Updating 'qtxmlpatterns_ru.qm'... Updating 'qtxmlpatterns_pl.qm'... Generated 465 translation(s) (465 finished and 0 unfinished) Ignored 15 untranslated source text(s) Generated 480 translation(s) (480 finished and 0 unfinished) call C:\Qt\Qt5.10\qttranslations\translations\lrelease_wrapper.bat qtxmlpatterns_uk.ts -qm qtxmlpatterns_uk.qm Updating 'qtxmlpatterns_sk.qm'... Generated 151 translation(s) (151 finished and 0 unfinished) Ignored 308 untranslated source text(s) Updating 'qtxmlpatterns_uk.qm'... Generated 49 translation(s) (49 finished and 0 unfinished) Ignored 431 untranslated source text(s)
After this It came back to the prompt. I assume that the build is finished as there were no messages related to it being finished or throwing errors.
EDIT: I did calljom install
after this and waited for it to finish.
Next I installed Qt Creator Enterprise Edition and configured the Kit to point to the qmake under the newly built folder.
However I am getting the following error:
11:35:28: Running steps for project TestCanBus... 11:35:28: Starting: "C:\Qt\Qt5.10\qtbase\bin\qmake.exe" C:\Users\prateekkhatri\Documents\TestCanBus\TestCanBus.pro -spec win32-msvc "CONFIG+=qml_debug" Project ERROR: Unknown module(s) in QT: serialbus 11:35:28: The process "C:\Qt\Qt5.10\qtbase\bin\qmake.exe" exited with code 3. Error while building/deploying project TestCanBus (kit: Desktop) When executing step "qmake" 11:35:28: Elapsed time: 00:00.
It is not able to identify QCanBus under the qtserialbus folder.
My .pro file has the following entries:QT += core gui QT += serialbus
It'll be really awesome if I can get this working. I would really appreciate any help.
Also, I tried adding QSerialPort by adding it in project and including it in one of my source files - it gave the same error. For some reason The Qt Modules are not being found.
Thanks!
-
Did you call
jom install
after building ? -
Yes I did.
-
Good, did you do that in qtbase or the Qt sources top level folder ?
-
@SGaist
I did it in the top-level folder or one level above qtbase. -
Check the content of the lib folder, if nothing QtSerialBus can be found, the quickest would be to build/install the module by hand. You can go in the module sources and call
qmake/jom/jom install
. -
C:\Qt\Qt5.10\qtserialbus\lib>ls Qt5SerialBus.dll Qt5SerialBus.exp Qt5SerialBus.lib Qt5SerialBus.prl Qt5SerialBusd.dll Qt5SerialBusd.exp Qt5SerialBusd.ilk Qt5SerialBusd.lib Qt5SerialBusd.pdb Qt5SerialBusd.prl cmake
These are the contents that I find in
qtserialbus
directory andC:\Qt\Qt5.10\qtserialbus\lib>cd cmake C:\Qt\Qt5.10\qtserialbus\lib\cmake>ls Qt5SerialBus C:\Qt\Qt5.10\qtserialbus\lib\cmake>cd Qt5SerialBus C:\Qt\Qt5.10\qtserialbus\lib\cmake\Qt5SerialBus>ls Qt5SerialBusConfig.cmake Qt5SerialBusConfigVersion.cmake Qt5SerialBus_PeakCanBusPlugin.cmake Qt5SerialBus_SystecCanBusPlugin.cmake Qt5SerialBus_TinyCanBusPlugin.cmake Qt5SerialBus_VectorCanBusPlugin.cmake C:\Qt\Qt5.10\qtserialbus\lib\cmake\Qt5SerialBus>
I did run
jom install
inside this folder, but Qt Creator still can't see this module for some reason. -
AFAIK, you should have all the libraries needed in
qtbase/lib
once the installation is done -
@SGaist
I could't see anything Qt5SerialBus inside the lib folder under qtbase. Any suggestions on how to get this working?I manually copied the contents of
qtserialbus/lib
intoqtbase/lib
and the contents ofqtserialbus/lib/cmake
intoqtbase/lib/cmake
, but Qt Creator doesn't seem to find the library still. -
@PrateekKhatri said in Compiling Qt from Source on Windows - Error:
\usr\local\Qt-5.10.0
Do you have a folder like that somewhere on your machine ?
-
@SGaist
Yes it is there in myC:\
. And I do see Qt5SerialBus related files in thelib
folder. Is there a reason why it would automatically move everything to a folder\usr\local\Qt5.10.0\
? -
The path is a bit surprising but you should use the -prefix option when you want your build to be located somewhere precisely, otherwise, Qt has it's defaults. But again, that's rather a *nix path than Windows.
-
-
You're welcome !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)