fluid
fluid copied to clipboard
Windows building cpp module error
I'm trying to build fluid on Windows OS by running these commands at fluid path
qbs setup-toolchains --type gcc C:\Qt\Qt5.10.0\Tools\mingw530_32\bin\g++.exe gcc
qbs setup-qt C:\Qt\Qt5.10.0\5.10.0\mingw53_32\bin\qmake.exe qt5
qbs config profiles.qt5.baseProfile gcc
qbs -d build
but when build starts i faced with this error:
Restoring build graph from disk
Resolving project for configuration default
ERROR: E:\Projects\Govara\fluid\tests\auto\core\core.qbs:3:1 Errors in product 'tst_fluid_core':
C:\Qt\Qt5.10.0\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\base\CppApplication.qbs:34:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\tests\auto\controls\controls.qbs:3:1 Errors in product 'tst_fluid_controls':
C:\Qt\Qt5.10.0\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\base\CppApplication.qbs:34:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\src\imports\templates\templates.qbs:3:1 Errors in product 'fluidtemplatesplugin':
E:\Projects\Govara\fluid\qbs\shared\imports\LiriProduct.qbs:8:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\src\imports\core\core.qbs:3:1 Errors in product 'fluidcoreplugin':
E:\Projects\Govara\fluid\qbs\shared\imports\LiriProduct.qbs:8:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\src\imports\controls\controls.qbs:4:1 Errors in product 'fluidcontrolsplugin':
E:\Projects\Govara\fluid\qbs\shared\imports\LiriProduct.qbs:8:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\src\imports\controls-private\controls-private.qbs:4:1 Errors in product 'fluidcontrolsprivateplugin':
E:\Projects\Govara\fluid\qbs\shared\imports\LiriProduct.qbs:8:5 Module cpp could not be loaded.
E:\Projects\Govara\fluid\src\demo\demo.qbs:7:5 Errors in product 'fluid-demo':
C:\Qt\Qt5.10.0\Tools\QtCreator\share\qtcreator\qbs\share\qbs\imports\qbs\base\CppApplication.qbs:34:5 Module cpp could not be loaded.
C:\Users\KoLiBer\AppData\Roaming\QtProject\qbs\1.10.1\profiles\qt5\modules\Qt\core\core.qbs:15:5 Module cpp could not be loaded.
Module CPP not be loaded
OS : Windows 10 Qt Version : 5.10.0 Qbs Version 1.10.0
That error makes me think something is wrong with the compiler. Open the project with QtCreator and build there, let's see if it works.
I would like to use the fluid controls for a windows desktop application. However the build doesn't work smoothly. as I'm no qml expert and have no qbs experience (normally I use visual studio) this makes it quite hard to fix problems. Any help or suggestions on the easiest solution would be appreciated.
Attempt 1:
I've opened the .qbs file and tried to build fluid with visual studio 2017/qt 5.10/release build which results in many errors. The first issue in the issue list is: Unexpected item type LiriQmlPlugin. Any hints on how to resolve this will be much appreciated (see the attached screenshot below).
Attempt2:
Opening the .pro file itself seems to have more success as the makefiles are generated and the build starts and continues until the fluidcontrolsplygin.lib target fails with the following error:
cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zi -MDd -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\debug\fluidcontrolsplugind.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -DWIN64 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DFLUID_INSTALL_ICONS=1 -DQT_NO_EXCEPTIONS -DQT_PLUGIN -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_WINDLL -IC:\tmp\fluid-develop\src\imports\controls -I. -IC:\tmp\fluid-develop\src\imports\controls -IC:\qt2\5.10.1\msvc2017_64\include -IC:\qt2\5.10.1\msvc2017_64\include\QtQuickControls2 -IC:\qt2\5.10.1\msvc2017_64\include\QtQuick -IC:\qt2\5.10.1\msvc2017_64\include\QtSvg -IC:\qt2\5.10.1\msvc2017_64\include\QtWidgets -IC:\qt2\5.10.1\msvc2017_64\include\QtGui -IC:\qt2\5.10.1\msvc2017_64\include\QtANGLE -IC:\qt2\5.10.1\msvc2017_64\include\QtQml -IC:\qt2\5.10.1\msvc2017_64\include\QtNetwork -IC:\qt2\5.10.1\msvc2017_64\include\QtCore -I.moc\debug -I\include -IC:\utils\my_sql\my_sql\include -IC:\utils\postgresql\pgsql\include -IC:\qt2\5.10.1\msvc2017_64\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\...\AppData\Local\Temp\moc_utils.obj.30836.42578.jom moc_utils.cpp link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /OUT:..\..\..\qml\Fluid\Controls\fluidcontrolsplugind.dll @C:\Users\...\AppData\Local\Temp\fluidcontrolsplugind.dll.30836.45234.jom Creating library ..\..\..\qml\Fluid\Controls\fluidcontrolsplugind.lib and object ..\..\..\qml\Fluid\Controls\fluidcontrolsplugind.exp jom: C:\tmp\build-fluid-Desktop_Qt_5_10_1_MSVC2017_64bit-Release\src\imports\Makefile [sub-controls-make_first] Error 2 jom: C:\tmp\build-fluid-Desktop_Qt_5_10_1_MSVC2017_64bit-Release\src\Makefile [sub-imports-make_first] Error 2 jom: C:\tmp\build-fluid-Desktop_Qt_5_10_1_MSVC2017_64bit-Release\Makefile [sub-src-make_first] Error 2 12:31:52: The process "C:\qt2\Tools\QtCreator\bin\jom.exe" exited with code 2. Error while building/deploying project fluid (kit: Desktop Qt 5.10.1 MSVC2017 64bit) When executing step "Make" 12:31:52: Elapsed time: 00:49.
Attempt3:
Trying to execute the project with Build->Run results in more compilation but an exe can't be found. This seems logical as the demo is not part of the project (see attached screenshot below) but at least some libs got build.
Attempt4
Opening the demo.qbs doesn't result in any build steps
Attempt5
In the examples project there is a minimalqmake folder. This complains about not being able to find the fluid.pro file. However adding a symbolic link to root fluid project fixed this. Execution fails because the Fluid.Control module couldn't be loaded. Adding the hard path to the qml dir fixes this (engine.addImportPath("C:/.../fluid-develop/examples/perproject/build-minimalqmake-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug/fluid/qml");. Which results in a beautiful but rather minimal example.
Any suggestions on the fastest path to using the fluid library (on windows, build with visual studio 2015/2017 tools could be QtCreator)?
I am having similar problems. Commented out all the lirideployment lines (even though that's probably not good), still getting Unexpected item type 'LiriQmlPlugin'.
and Dependency 'fluidcontrolsplugin' not found for product 'fluid-artifacts/fluid-windows'.
Also the build with qmake (instead of qbs) works fine, even though I get errors in the editor about the Fluid.Controls import. I have no idea how to proceed as this is my first time using qbs instead of qmake
Unexpected item type LiriQmlPlugin
means that you didn't fetch git submodules.
You are not supposed to use the .pro project along rather use it like in the example and documentation.
@Capitan-KoLiBer Module CPP not be loaded
seems to be related to your toolchain. I can't reproduce the problem using Visual Studio.
thanks @plfiorini my problems solved using vs compiler, but using qmake also can compile using qmake ( not qbs ) without any error
@plfiorini Thanks, after properly cloning the repo + submodules, everything worked great. Tried out the demo on windows, there are some buggy/crash parts. Is that well known or worth reporting?
@chocolatkey It was working fine on Windows but it's been a while... please file a bug report
I am getting same issue on linux (Ubuntu 18.03). What is the solution for it?