gpt4 book ai didi

QtMqtt 模块 "PCH files error"。在 Centos 上安装 QtMqtt 模块时出现问题

转载 作者:行者123 更新时间:2023-12-04 19:31:42 26 4
gpt4 key购买 nike

在尝试在 centos 上安装 qt mqtt 模块时,我遇到了 PCH 问题。我正在执行以下步骤。但是当我运行 make 语句时,我遇到了问题。问题是 PCH 文件。我遇到的错误输出如下。提前感谢那些提供帮助的人。

[oozturk@dev-host-06 qtmqtt]$ egrep '^(VERSION|NAME)=' /etc/os-release 
NAME="CentOS Linux"
VERSION="8"

[oozturk@dev-host-06 Downloads]$ git clone -b 5.15.2 http://github.com/qt/qtmqtt.git
Cloning into 'qtmqtt'...
...

[oozturk@dev-host-06 Downloads]$ cd qtmqtt/
[oozturk@dev-host-06 qtmqtt]$ ls
dist examples LICENSE.GPL3 LICENSE.GPL3-EXCEPT qtmqtt.pro src sync.profile tests
[oozturk@dev-host-06 qtmqtt]$ /home/oozturk/Qt/5.15.2/gcc_64/bin/qmake
Info: creating stash file /home/oozturk/Downloads/qtmqtt/.qmake.stash
Info: creating cache file /home/oozturk/Downloads/qtmqtt/.qmake.cache
[oozturk@dev-host-06 qtmqtt]$
[oozturk@dev-host-06 qtmqtt]$ make
cd src/ && ( test -e Makefile || /home/oozturk/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /home/oozturk/Downloads/qtmqtt/src/src.pro ) && make -f Makefile
make[1]: Entering directory '/home/oozturk/Downloads/qtmqtt/src'
cd mqtt/ && ( test -e Makefile || /home/oozturk/Qt/5.15.2/gcc_64/bin/qmake -o Makefile /home/oozturk/Downloads/qtmqtt/src/mqtt/mqtt.pro ) && make -f Makefile
Project MESSAGE: perl -w /home/oozturk/Qt/5.15.2/gcc_64/bin/syncqt.pl -module QtMqtt -version 5.15.2 -outdir /home/oozturk/Downloads/qtmqtt -builddir /home/oozturk/Downloads/qtmqtt /home/oozturk/Downloads/qtmqtt
<srcbase> = /home/oozturk/Downloads/qtmqtt
<bldbase> = /home/oozturk/Downloads/qtmqtt
<outbase> = /home/oozturk/Downloads/qtmqtt
QtMqtt: created fwd-include header(s) for <srcbase>/src/mqtt/ { qmqttauthenticationproperties.h (2), qmqttclient.h (2), qmqttclient_p.h (1), qmqttconnection_p.h (1), qmqttconnectionproperties.h (4), qmqttconnectionproperties_p.h (1), qmqttcontrolpacket_p.h (1), qmqttglobal.h (1), qmqttmessage.h (2), qmqttmessage_p.h (1), qmqttpublishproperties.h (3), qmqttpublishproperties_p.h (1), qmqttsubscription.h (2), qmqttsubscription_p.h (1), qmqttsubscriptionproperties.h (3), qmqtttopicfilter.h (2), qmqtttopicname.h (2), qmqtttype.h (3) }
QtMqtt: created version header
QtMqtt: created master header
QtMqtt: created headers.pri file
make[2]: Entering directory '/home/oozturk/Downloads/qtmqtt/src/mqtt'
perl /home/oozturk/Qt/5.15.2/gcc_64/mkspecs/features/data/unix/findclasslist.pl < QtMqtt.version.in > QtMqtt.version
g++ -pipe -O2 -g -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.15.2 -I../../include/QtMqtt/5.15.2/QtMqtt -I/home/oozturk/Qt/5.15.2/gcc_64/include -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtNetwork -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore/5.15.2 -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore/5.15.2/QtCore -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore -I.moc -I/home/qt/openssl-1.1.1g/include -I/home/oozturk/Qt/5.15.2/gcc_64/mkspecs/linux-g++ -x c++-header -c ../../include/QtMqtt/QtMqttDepends -o .pch/Qt5Mqtt.gch/c++
g++ -c -include .pch/Qt5Mqtt -pipe -O2 -g -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtMqtt -I../../include/QtMqtt/5.15.2 -I../../include/QtMqtt/5.15.2/QtMqtt -I/home/oozturk/Qt/5.15.2/gcc_64/include -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtNetwork -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore/5.15.2 -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore/5.15.2/QtCore -I/home/oozturk/Qt/5.15.2/gcc_64/include/QtCore -I.moc -I/home/qt/openssl-1.1.1g/include -I/home/oozturk/Qt/5.15.2/gcc_64/mkspecs/linux-g++ -o .obj/qmqttauthenticationproperties.o qmqttauthenticationproperties.cpp
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
cc1plus: fatal error: .pch/Qt5Mqtt: No such file or directory
compilation terminated.
make[2]: *** [Makefile:1726: .obj/qmqttauthenticationproperties.o] Error 1
make[2]: Leaving directory '/home/oozturk/Downloads/qtmqtt/src/mqtt'
make[1]: *** [Makefile:47: sub-mqtt-make_first] Error 2
make[1]: Leaving directory '/home/oozturk/Downloads/qtmqtt/src'
make: *** [Makefile:49: sub-src-make_first] Error 2

最佳答案

解决了。问题是没有创建文件 Qt5Mqtt。我看到当我在../qtmqtt/src/mqtt/.pch路径上手动创建Qt5Mqtt文件时问题解决了。我通过运行测试代码对其进行了测试。

[oozturk@dev-host-06 .pch]# pwd
/home/oozturk/Desktop/Projects/qtmqtt/src/mqtt/.pch
[oozturk@dev-host-06 .pch]# touch Qt5Mqtt

关于QtMqtt 模块 "PCH files error"。在 Centos 上安装 QtMqtt 模块时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68571933/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com