为什么我会在git subsodule上获得标题包含错误
我已经服用了另一个 library ,并将其作为子模块添加到我的存储库中。 我包括这样的图书馆。
#include "../NMEA2000/src/NMEA2000_CAN.h"
我使用QMAKE生成的makefile进行编译。标题文件及其包含在.pro文件中也引用了。 我仍然会遇到以下错误:
In file included from ../NMEA2000/src/NMEA2000.h:50:0,
from ../NMEA2000/src/NMEA2000_CAN.h:89,
from MainWindow.cpp:15:
../NMEA2000/src/N2kCANMsg.h:26:10: fatal error: N2kMsg.h: file or directory not found
#include <N2kMsg.h>
显然我包含的文件,而下一个文件也没有,但没有包含的文件。如果我将所讨论的文件更改为#include“ n2kmsg.h”
而不是。我将遇到一个有类似问题的下一个,但指向另一个子模块。 我有一种强烈的感觉,我缺少有关标题的工作方式。我在这里做错了什么?我希望不触摸子模块的内容。
I have taken another ones library and added it as a submodule to my repository.
I included the library like this.
#include "../NMEA2000/src/NMEA2000_CAN.h"
I compile using a qmake generated makefile. The header file and its includes are referred to in the .pro file as well.
I still get the following error:
In file included from ../NMEA2000/src/NMEA2000.h:50:0,
from ../NMEA2000/src/NMEA2000_CAN.h:89,
from MainWindow.cpp:15:
../NMEA2000/src/N2kCANMsg.h:26:10: fatal error: N2kMsg.h: file or directory not found
#include <N2kMsg.h>
Apparently the file I included and the next one are being found but not another that is included there. If I change the file in question to #include "N2kMsg.h"
instead. I will just run into the next one with a similar issue but pointing to another submodule.
I have a strong feeling that I am missing something about the way headers work. What am I doing wrong here? I would prefer not to touch the contents of the submodule.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论