【发布时间】:2022-01-14 17:18:04
【问题描述】:
我正在尝试构建 qt 项目,但我不断收到关于 moc 对象 moc_SerialPortManager.cpp 中没有现有标头的错误。我使用 bash 移动到该目录,并使用 cd cmd 和用模拟对象编写的路径,它指向正确的目录。有没有人知道如何解决它?在这一点上,这是一个相当大的项目,所以请告诉我我可以发布什么来让你更容易? 我在 git https://github.com/Orpiczy/AcornScanner/compare/fronAndBackJoin 上都有,如果你想查看的话
我正在为 c++ 和 Qt 6.2.0 使用 Mingw 编译器 8.1.0 64 位,我正在使用 windows10
moc_SerialPortManager.cpp
#include <memory>
#include "../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp"
#include <QtCore/qbytearray.h> ...
日志 E:\Dokumenty\AiR_rok_4\S7\EngineeringThesis\AcornScanner\cm\cm-lib\build\windows\gcc\x64\debug.moc\moc_SerialPortManager.cpp:10:错误:../../../.. /../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp:没有这样的文件或目录 ........\AcornScanner\cm\cm-lib\build\windows\gcc\x64\debug.moc\moc_SerialPortManager.cpp:10:10:致命错误:../../../。 ./../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp:没有这样的文件或目录 #include "../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
【问题讨论】:
标签: c++ qt compiler-errors path mocking