質問するログイン新規登録
Qt

QtはGUIプログラムの開発で広く使われているクロスプラットフォーム開発のフレームワークです。

MQTT

MQTT(Message Queue Telemetry Transport)とは、TCP/IPネットワークで利用可能な通信プロトコルの一つで、IoT/M2M向けに開発された軽量なプロトコルです。ヘッダ部分は最小2バイトと小さく、通信量・CPU負荷・電力消費量などを抑えることができます。

Q&A

解決済

1回答

138閲覧

Qt6.8.3版「QtMqtt」のビルドエラーについて

LS_Takao

総合スコア14

Qt

QtはGUIプログラムの開発で広く使われているクロスプラットフォーム開発のフレームワークです。

MQTT

MQTT(Message Queue Telemetry Transport)とは、TCP/IPネットワークで利用可能な通信プロトコルの一つで、IoT/M2M向けに開発された軽量なプロトコルです。ヘッダ部分は最小2バイトと小さく、通信量・CPU負荷・電力消費量などを抑えることができます。

0グッド

0クリップ

投稿2025/09/29 03:02

編集2025/09/29 04:02

0

0

実現したいこと

Qt6.8.3用の「QtMqtt」をビルドしたい。

発生している問題・分からないこと

Qt6.8.3用の「QtMqtt」がビルドできず困っています。
「QtMqtt」はGitHubから取得し、Qtのバージョンに合わせてブランチ、チェックアウトを行いました。
※詳細は下記を参照願います。
※ビルド時の出力情報はエラーメッセージを参照願います。

①git clone https://github.com/qt/qtmqtt.git
②cd qtmqtt
③git branch
④git checkout 6.8.3
⑤git branch
⑥cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH="C:\DevelopTools\Qt\Qt_6.8.3\6.8.3\mingw_64" -DCMAKE_BUILD_TYPE=Debug
⑦cmake --build build --parallel

ビルドを正常に完了させるための対処方法をご教授いただけると助かります。
宜しくお願い致します。

エラーメッセージ

error

1※全てを貼り付けると文字数を超えてしまうため抜粋しています。 2 3 static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the h 4elper function noexcept 5 error: C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype. 6h:536:5:error: C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetaty 7pe.h:536:5:': 8 static assertion failed: Use *_NON_NOE 9XCEPT version of the macro, or make the helper function noexcept 10 C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h:536: 115: Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QMetaType) 12 static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make t 13he helper function noexcept 14 error: Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT^~~~~~~~~~~~~~~~~~ 15~~~~~~~~~~~~~~~~~~~~~~~~error: static assertion failed: Use *_NON_NOEXCEPT versi 16on of the macro, or make the helper function noexcept 17 (QMetaType) 18 static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make t 19he helper function noexcept 20 (QMetaType) 21 22^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEX 23CEPTstatic assertion failed: Use *_NON_NOEXCEPT version of the macro, or make th 24e helper function noexcept 25 Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPTIn file included from ^~~~~~~~~~~ 26~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 27(QMetaType) 28 C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qglobal.h:63(QMet 29aType) 30 31^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEX 32CEPT , 33 from (QMetaType) 34 35C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qglobal.h:63C:/Users/N 36KC-AIPJ/qtmqtt/src/mqtt/qmqttglobal.h:7^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37~, 38 from , 39 from C:/Users/NKC-A 40IPJ/qtmqtt/src/mqtt/qmqttglobal.h:7C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMqtt 41/qmqttglobal.h:1C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qgloba 42l.h:63C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qglobal.h:63^~~~ 43~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~, 44 from 45, 46 , 47 from C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMqtt/qmqttglobal. 48h:1 49In file included from , 50 from , 51 from C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/ 52qglobal.h:63C:/Users/NKC-AIPJ/qtmqtt/src/mqtt/qmqttglobal.h:7C:/Users/NKC-AIPJ/q 53tmqtt/src/mqtt/qmqttglobal.h:7C:/Users/NKC-AIPJ/qtmqtt/src/mqtt/qmqttclient.h:7, 54 from In file included from , 55 from , 56 from C:\Users\NKC-AIPJ\qtmqtt\src\mqtt\qmqtttopicfilter.cpp:4C: 57/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qglobal.h:63C:/Users/NKC 58-AIPJ/qtmqtt/src/mqtt/qmqttglobal.h:7C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMq 59tt/qmqttglobal.h:1, 60 from : 61, 62 , 63 from C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMqtt/qmqttglobal. 64h:1C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h:, 65 from C:/Users/NKC-AIPJ/qtmqtt/src/mqtt/qmqttglobal.h:7C:\Users\ 66NKC-AIPJ\qtmqtt\build\src\mqtt\Mqtt_autogen\EWIEGA46WW/moc_qmqttclient. , 67 from C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMqtt/qmqttglobal. 68h:1 In function ', 69 from , 70 from C:\User 71s\NKC-AIPJ\qtmqtt\src\mqtt\qmqttconnectionproperties.h:7, 72 from C:\Users\NKC-AIPJ\qtmqtt\build\src\mqtt\Mqtt_autogen\mocs_ 73compilation.cpp:2, 74 , 75 from C:/Users/NKC-AIPJ/qtmqtt/build/include/QtMqtt/qmqttglobal. 76h:1, 77 from ': 78 C:\Users\NKC-AIPJ\qtmqtt\src\mq 79tt\qmqtttype.cpp:4C:\Users\NKC-AIPJ\qtmqtt\src\mqtt\qmqttconnectionproperties.cp 80p:4 , 81 from : 82, 83 from : 84: 85 C:/DevelopTools/Qt/Qt_6.8.3/6. 868.3/mingw_64/include/QtCore/qmetatype.h:C:\Users\NKC-AIPJ\qtmqtt\src\mqtt\qmqttc 87onnection_p.h:18C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qgloba 88l.h:63 C:/D 89evelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h: , 90 from , 91 from , 92 from static assertion failed: Use * 93_NON_NOEXCEPT version of the macro, or make the helper function noexcept 94 bool operator==(const QM 95etaType&, const QMetaType&)C:\Users\NKC-AIPJ\qtmqtt\src\mqtt\qmqttconnection.cpp 96:4 : 97': 98bool operator==(const QMetaType&, const QMetaType&)Q_DECLARE_EQUALITY_COMPARABLE 99_NON_NOEXCEPTC:/Users/NKC-AIPJ/qtmqtt/src/mqtt/qmqttglobal.h:7: 100': 101C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h:C:/Develop 102Tools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h:536:5:': 103(QMetaType) 104 , 105 from C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/ 106qmetatype.h:C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype. 107h:536:5: C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore 108/qmetatype.h:536:5: C:/Users/NKC-AIPJ/q 109tmqtt/build/include/QtMqtt/qmqttglobal.h:1 bool operator==(const Q 110MetaType&, const QMetaType&) 111, 112 from static assertion failed: Use *_NON_NOEXCEPT version of the 113 macro, or make the helper function noexcept 114 error: ': 115C:\Users\NKC-AIPJ\qtmqtt\src\mqtt\qmqttsubscription.h:7Q_DECLARE_EQUALITY_COMPAR 116ABLE_NON_NOEXCEPT static asser 117tion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper functio 118n noexcept 119 error: C:/DevelopTools/Qt/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype. 120h:536:5:, 121 from ': 122(QMetaType) 123 C:/DevelopTools/Q 124t/Qt_6.8.3/6.8.3/mingw_64/include/QtCore/qmetatype.h:536:5:^~~~~~~~~~~~~~~~~~~~~ 125~~~~~~~~~~~~~~~~~~~~~static assertion failed: Use *_NON_NOEXCEPT version of the 126macro, or make the helper function noexcept 127 error: : 128 Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT 129

該当のソースコード

特になし

試したこと・調べたこと

  • teratailやGoogle等で検索した
  • ソースコードを自分なりに変更した
  • 知人に聞いた
  • その他
上記の詳細・結果

Copilotなどで解決策を調べたが解消することができなかった。

補足

特になし

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

背景としてQt5.15.1からQt6.8.3に変更した。
Qt5.15.1を使用時、「mingw810_64」を使用していた。
Qt6.8.3に移行時も「mingw810_64」を追加でインストールし使用していた。
しかしながら、Qt6.8.3と「mingw810_64」の組み合わせではQtMqttのビルドでエラーが発生した。
そこで、Qt6.8.3に付属していた「mingw1310_64」を用いるように変更したところ、QtMqttのビルドとインストールを正常に行うことができた。

投稿2025/09/29 08:05

LS_Takao

総合スコア14

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.30%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問