Qt6 Cross Compile for Windows
Unsolved
Qt 6
-
Hi, I trying cross compilling QT 6.5.0. Everrything is compilling whithout errors and when installing i got the error 'qtbase/plugins/networkinformation/qnetworklistmanager.dll not found'
My Host OS is Ubunttu 22.04 and my build script is
#!/bin/bash cd "/home/vagrant/tools/qt-build/build/" ../../qt5-src/configure -prefix "/home/vagrant/tools/qt-build/package" \ -release -opensource -confirm-license -make libs -make tools \ -opengl desktop -xplatform win32-g++ \ -nomake tests -nomake examples \ -skip qtwebengine -skip qtdocgallery -skip qtlocation \ -skip qtx11extras \ -skip qt3d -skip qtquick3d -skip qtquick3dphysics -skip qtcanvas3d -skip qtgraphicaleffects -skip qtmultimedia \ -skip qtwebsockets -skip qtactiveqt \ -skip qtcharts -skip qtdoc \ -skip qtremoteobjects -skip qtserialbus -skip qtwebchannel \ -skip qtwebview -skip qtandroidextras -skip qtconnectivity \ -skip qtgamepad -skip qtmacextras -skip qtpurchasing -skip qtscript \ -skip qttranslations -skip qtwinextras \ -skip qtdatavis3d \ -skip qtquickcontrols -skip qtscxml \ -skip qtvirtualkeyboard -skip qtwebglplugin \ -skip qtimageformats -skip qtnetworkauth -skip qtquickcontrols2 \ -skip qtsensors -skip qtwayland \ -no-feature-thread \ -qt-host-path "/home/vagrant/tools/qt-6.5.0/x86_64/" \ -- -DCMAKE_TOOLCHAIN_FILE=/usr/local/vs_cmake/mingw-w64-x86_64.cmake # -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON cmake --build . --verbose cmake --install . --verbose
And my Cmake Toolchain is
set(CMAKE_SYSTEM_NAME Windows) set(TOOLCHAIN_PREFIX /usr/bin/x86_64-w64-mingw32) # cross compilers to use for C, C++ and Fortran set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran) set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) # target environment on the build host system set(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_PREFIX}) # modify default behavior of FIND_XXX() commands set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/include/dxsdk/") set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
-
You are missing the qnetworklistmanager.dll file from "Qt\<your Qt Version>\<Your kit>\plugins\networkinformation" folder.
-
@pavanbellary But why cmake try to install it when it is not compilled and there are no errors at configure and at compilation.