Mqtt
-
wrote on 9 Dec 2024, 10:08 last edited by
Hello, can I use the mqtt library in the free version, if so, why can't I connect it?
-
Lifetime Qt Championwrote on 9 Dec 2024, 10:15 last edited by jsulm 12 Sept 2024, 10:16
@Sergey_85 Do you mean https://doc.qt.io/qt-6/qtmqtt-index.html ? It is available under GPLv3, so yes you can use it freely as long as you do not violate GPLv3.
"if so, why can't I connect it?" - who knows, you did not provide any details...
And what does "connect" mean here? You can't link? You can't establish a connection? -
wrote on 9 Dec 2024, 12:38 last edited by
Sorry for explaining it wrong. When I add to Cmakefile.txt
find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
I get the error:
C:\Projects_Qt\MqttTest\CMakeLists.txt:14: error: Found package configuration file:C:/Qt/6.8.0/mingw_64/lib/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
FOUND. Reason given by package:Failed to find required Qt component "Mqtt".
Expected Config file at
"C:/Qt/6.8.0/mingw_64/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake" does NOT exist -
@Sergey_85 Do you mean https://doc.qt.io/qt-6/qtmqtt-index.html ? It is available under GPLv3, so yes you can use it freely as long as you do not violate GPLv3.
"if so, why can't I connect it?" - who knows, you did not provide any details...
And what does "connect" mean here? You can't link? You can't establish a connection? -
wrote on 9 Dec 2024, 13:14 last edited by
@Sergey_85 said in Mqtt:
Through Qt Maintenance Tool I can't find Mqtt module to install.
Unless something has changed, which apparently isn't the case here, you have to build
QMQTT
yourself from source, as it's not available in Online Installer for open source users.See:
-
@Sergey_85 said in Mqtt:
Through Qt Maintenance Tool I can't find Mqtt module to install.
Unless something has changed, which apparently isn't the case here, you have to build
QMQTT
yourself from source, as it's not available in Online Installer for open source users.See:
-
wrote on 10 Dec 2024, 11:37 last edited by
Thanks, with MinGW, I managed to connect Mqtt from manually assembled libraries. Can you please tell me how to solve the issue with the compilation Android app?
-
Thanks, with MinGW, I managed to connect Mqtt from manually assembled libraries. Can you please tell me how to solve the issue with the compilation Android app?
@Sergey_85 said in Mqtt:
Can you please tell me how to solve the issue with the compilation Android app?
Please tell us first what issue it is...
Did you build mqtt for Android? -
@Sergey_85 said in Mqtt:
Can you please tell me how to solve the issue with the compilation Android app?
Please tell us first what issue it is...
Did you build mqtt for Android? -
@jsulm First I needed to do it for a window application, I did it, now I need to connect mqtt to a mobile application but there is aarch64-v8 architecture so compilation does not work.
Lifetime Qt Championwrote on 11 Dec 2024, 07:18 last edited by jsulm 12 Nov 2024, 07:19@Sergey_85 said in Mqtt:
but there is aarch64-v8 architecture so compilation does not work.
Just build it using Android NDK or your Android Kit in QtCreator.
And please, "does not work" does not tell anything. You should say what you tried and what happened.
-
@Sergey_85 said in Mqtt:
but there is aarch64-v8 architecture so compilation does not work.
Just build it using Android NDK or your Android Kit in QtCreator.
And please, "does not work" does not tell anything. You should say what you tried and what happened.
wrote on 11 Dec 2024, 10:39 last edited by Sergey_85 12 Nov 2024, 11:10@jsulm I can't build sources for Arm64-v8a
cmake .. \ -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \ -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \ -DANDROID_ABI=arm64-v8a \ -DANDROID_NATIVE_API_LEVEL=21 -- The CXX compiler identification is Clang 17.0.2 -- The C compiler identification is Clang 17.0.2 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Error at CMakeLists.txt:14 (find_package): Could not find a package configuration file provided by "Qt6" (requested version 6.8.0) with any of the following names: Qt6Config.cmake qt6-config.cmake Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred!
Maybe I'm doing something wrong?
Qt6Config.cmake is located at the specified path -
@jsulm I can't build sources for Arm64-v8a
cmake .. \ -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \ -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \ -DANDROID_ABI=arm64-v8a \ -DANDROID_NATIVE_API_LEVEL=21 -- The CXX compiler identification is Clang 17.0.2 -- The C compiler identification is Clang 17.0.2 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Error at CMakeLists.txt:14 (find_package): Could not find a package configuration file provided by "Qt6" (requested version 6.8.0) with any of the following names: Qt6Config.cmake qt6-config.cmake Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred!
Maybe I'm doing something wrong?
Qt6Config.cmake is located at the specified path@Sergey_85 Did you install Qt for Android?
-
@Sergey_85 Did you install Qt for Android?
-
@jsulm I can't build sources for Arm64-v8a
cmake .. \ -DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64 \ -DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake \ -DANDROID_ABI=arm64-v8a \ -DANDROID_NATIVE_API_LEVEL=21 -- The CXX compiler identification is Clang 17.0.2 -- The C compiler identification is Clang 17.0.2 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Error at CMakeLists.txt:14 (find_package): Could not find a package configuration file provided by "Qt6" (requested version 6.8.0) with any of the following names: Qt6Config.cmake qt6-config.cmake Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR" to a directory containing one of the above files. If "Qt6" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred!
Maybe I'm doing something wrong?
Qt6Config.cmake is located at the specified path@Sergey_85 said in Mqtt:
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64
This doesn't look like a path to Qt for Android
-
@Sergey_85 said in Mqtt:
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.0/gcc_64
This doesn't look like a path to Qt for Android
-
@Sergey_85 And what happened? Does /home/ph/opt/Qt/6.8.0/gcc_64 contain Qt6Config.cmake or qt6-config.cmake like CMake requested in the error message?
-
@Sergey_85 And what happened? Does /home/ph/opt/Qt/6.8.0/gcc_64 contain Qt6Config.cmake or qt6-config.cmake like CMake requested in the error message?
wrote on 12 Dec 2024, 07:40 last edited by@jsulm yes, the Qt6Config.cmake file is also in the folder
/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6/Qt6Config.cmakeI haven't compiled from sources before, what's in the kit was enough for me, so I apologize if I'm asking something wrong or providing incomplete information, I'm confused(
-
@jsulm yes, the Qt6Config.cmake file is also in the folder
/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6/Qt6Config.cmakeI haven't compiled from sources before, what's in the kit was enough for me, so I apologize if I'm asking something wrong or providing incomplete information, I'm confused(
@Sergey_85 The I think it should be
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
-
@Sergey_85 The I think it should be
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
wrote on 12 Dec 2024, 07:52 last edited by@jsulm ```
cmake ..
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
-DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake
-DANDROID_ABI=arm64-v8a
-DANDROID_NATIVE_API_LEVEL=21
-- The CXX compiler identification is Clang 17.0.2
-- The C compiler identification is Clang 17.0.2
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:14 (find_package):
Could not find a package configuration file provided by "Qt6" (requested
version 6.8.1) with any of the following names:Qt6Config.cmake qt6-config.cmake
Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
to a directory containing one of the above files. If "Qt6" provides a
separate development package or SDK, be sure it has been installed.-- Configuring incomplete, errors occurred!
-
@jsulm ```
cmake ..
-DCMAKE_PREFIX_PATH=/home/ph/opt/Qt/6.8.1/android_arm64_v8a/lib/cmake/Qt6
-DCMAKE_TOOLCHAIN_FILE=/home/ph/Android/Sdk/ndk/26.1.10909125/build/cmake/android.toolchain.cmake
-DANDROID_ABI=arm64-v8a
-DANDROID_NATIVE_API_LEVEL=21
-- The CXX compiler identification is Clang 17.0.2
-- The C compiler identification is Clang 17.0.2
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ph/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:14 (find_package):
Could not find a package configuration file provided by "Qt6" (requested
version 6.8.1) with any of the following names:Qt6Config.cmake qt6-config.cmake
Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
to a directory containing one of the above files. If "Qt6" provides a
separate development package or SDK, be sure it has been installed.-- Configuring incomplete, errors occurred!
@Sergey_85 Try with a clean build folder (best to create a fresh one)
1/25