How to build QtPdf?
-
@slavaw said in How to build QtPdf?:
qt-configure-module: command not found
then use absolute path to the command
-
@slavaw you add
Qt += pdfwidgetsTo find out which modules to add, you can simply check a pdf example out.
Are you making QML project?@JoeCFD said in How to build QtPdf?:
Qt += pdfwidgets
I try add this to my .pro file, but i got error again:
@JoeCFD said in How to build QtPdf?:
To find out which modules to add, you can simply check a pdf example out.
I need to add QtPdf module to use QPdfDocument - https://doc.qt.io/qt-6/qtpdf-index.html
@JoeCFD said in How to build QtPdf?:
Are you making QML project?
I make project, where QML using for view and C++ for logic. If it is important, I use qmake for build project.
-
@slavaw said in How to build QtPdf?:
qt-configure-module: command not found
then use absolute path to the command
@jsulm said in How to build QtPdf?:
then use absolute path to the command
I found "qt-configure-module" in this folders (path home/Qt/6.6.1/):
Which of these files should I run? Android folders for Android, GCC for Windows, WASM for C languages. Come to think of it I'm using multithreading, so I need to execute file in "wasm_multithread/bin"?In the path "home/Qt/6.6.1/Src/qtbase/bin" i found "qt-configure-module.in" with this description inside:
I tried to exec this file and get this error:
I checked path in error and not found "qt-cmake-private", but found it in this folders:
-
@jsulm said in How to build QtPdf?:
then use absolute path to the command
I found "qt-configure-module" in this folders (path home/Qt/6.6.1/):
Which of these files should I run? Android folders for Android, GCC for Windows, WASM for C languages. Come to think of it I'm using multithreading, so I need to execute file in "wasm_multithread/bin"?In the path "home/Qt/6.6.1/Src/qtbase/bin" i found "qt-configure-module.in" with this description inside:
I tried to exec this file and get this error:
I checked path in error and not found "qt-cmake-private", but found it in this folders:
@slavaw said in How to build QtPdf?:
Which of these files should I run?
The one you want to build for.
-
@slavaw said in How to build QtPdf?:
Which of these files should I run?
The one you want to build for.
-
-
@slavaw Did you install Emscripten? As far as I know you need it to be able to build for Wasm.
-
@jsulm said in How to build QtPdf?:
Did you install Emscripten? As far as I know you need it to be able to build for Wasm.
I installed Emscripten, re-executed cmd and got the last error.
-
@jsulm I dug through the files and realized that my project was being built in the Src folder, but I found the "qt-configure-module" file only in "Src/qtbase/bin". I tried to execute cmd and get error.
Src folder:
Command execute:
@slavaw said in How to build QtPdf?:
my project was being built in the Src folder
Don't do that!
Checkout the source code again to get rid of all your build artefacts!
but I found the "qt-configure-module" file only in "Src/qtbase/bin" - this does not mean you have to build inside source forlder. As I already wrote before: use absolute path to qt-configure-module -
@slavaw said in How to build QtPdf?:
my project was being built in the Src folder
Don't do that!
Checkout the source code again to get rid of all your build artefacts!
but I found the "qt-configure-module" file only in "Src/qtbase/bin" - this does not mean you have to build inside source forlder. As I already wrote before: use absolute path to qt-configure-module -
@slavaw Why do you post pictures instead of text?
"but it didn't help" - this is not a problem description. If it did not work then please tell us what happened...@jsulm I think pictures are easier to understand, but if you insist:
I reinstalled Emscripten, after install nodejs, flex, bison, gperf and now after execute (path ~/qtpdf/build):~/Qt/6.6.1/gcc_64/bin/qt-configure-module ../qtwebengine -- -DFEATURE_qtwebengine_build=OFF
QtPdf Module built succesfull, but CMake exited with error.
Error:
-- Configuring done CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfWidgets" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtModuleHelpers.cmake:173 (_qt_internal_add_library) src/pdfwidgets/CMakeLists.txt:6 (qt_internal_add_module) CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfQuick" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtModuleHelpers.cmake:173 (_qt_internal_add_library) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:164 (qt_internal_add_module) src/pdfquick/CMakeLists.txt:16 (qt_internal_add_qml_module) CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfQuickplugin" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2168 (_qt_internal_add_library) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtPluginHelpers.cmake:91 (qt6_add_plugin) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:217 (qt_internal_add_plugin) src/pdfquick/CMakeLists.txt:16 (qt_internal_add_qml_module) -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtProcessConfigureArgs.cmake:1040 (message): CMake exited with code 1.
-
@jsulm I think pictures are easier to understand, but if you insist:
I reinstalled Emscripten, after install nodejs, flex, bison, gperf and now after execute (path ~/qtpdf/build):~/Qt/6.6.1/gcc_64/bin/qt-configure-module ../qtwebengine -- -DFEATURE_qtwebengine_build=OFF
QtPdf Module built succesfull, but CMake exited with error.
Error:
-- Configuring done CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfWidgets" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtModuleHelpers.cmake:173 (_qt_internal_add_library) src/pdfwidgets/CMakeLists.txt:6 (qt_internal_add_module) CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfQuick" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtModuleHelpers.cmake:173 (_qt_internal_add_library) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:164 (qt_internal_add_module) src/pdfquick/CMakeLists.txt:16 (qt_internal_add_qml_module) CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2355 (add_library): Target "PdfQuickplugin" links to target "XKB::XKB" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2168 (_qt_internal_add_library) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtPluginHelpers.cmake:91 (qt6_add_plugin) /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:217 (qt_internal_add_plugin) src/pdfquick/CMakeLists.txt:16 (qt_internal_add_qml_module) -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. CMake Error at /home/slava/Qt/6.6.1/gcc_64/lib/cmake/Qt6/QtProcessConfigureArgs.cmake:1040 (message): CMake exited with code 1.
@slavaw said in How to build QtPdf?:
but if you insist
Well, I insist because it can be helpful for others to have it as text if they want to provide you modified versions (or test it on their own).
Regarding the error you get now: make sure you installed libxcb-xkb1 and libxcb1-dev packages.