Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Statically link Qt application with QML

Tags:

c++

qt

qml

I am trying to statically link a Qt application which uses the QML module. Previously when it did not include QML I was able to build and link it statially.

In the compile output I get the following message:

'C:\Qt\5.4\qtbase\bin\qmlimportscanner.exe' is not recognized as an internal or external command,
operable program or batch file.

The qmlimportscanner.exe is indeed missing from my installation. After some research the only place I have found this file is the qt5-declarative-tools Cygwin package.

In the maintenence tool I was not able to identify any package that I would suspect to contain this tool. How do I get the qmlimportscanner.exe?

I am running Windows 8.1 and Qt 5.4.

like image 805
Gábor Angyal Avatar asked Aug 22 '26 05:08

Gábor Angyal


1 Answers

It seems that the declarative module of Qt was not build. I have built a static version of Qt a few month ago, and I do not remember taking out the declarative module explicitly. Maybe I did, or maybe it is indeed not built by default. Anyway this modul can be buil by itself using nmake (or jom):

nmake module-qtdeclarative
like image 62
Gábor Angyal Avatar answered Aug 24 '26 20:08

Gábor Angyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!