我有一个函数,可以在文件中获取三维弧中的点,但是,试图将代码排序到适当的文件夹中,我破坏了它,我不知道为什么,因为我认为我正确地包含了它。
最初很多计算都在“messages.cpp”文件中,但它应该只有消息,并且计算应该在calculations文件夹中。
#include "../../FGProcessorModule/Calculations/ArcToPoints.h"
namespace myNamespace {
void MsgProvider::onEvent{
std::vector<Formulas::LLPoint> allPoints = ArcToPoints(center, start, end);
}
}
在“../../FGProcessorModule/Calculations/ArcToPoints.h”中,我有:
#ifndef ARCTOPOINTS_H
#define ARCTOPOINTS_H
#include blablabla
namespace myNamespace{
std::vector<Formulas::LLPoint> ArcToPoints (Formulas::LLPoint, Formulas::LLPoint, Formulas::LLPoint);
}
#endif /* ARCTOPOINTS_H */
最后在“../../FGProcessorModule/Calculations/ArcToPoints.cpp”中,我有:
#include "ArcToPoints.h"
namespace myNamespace{
std::vector<Formulas::LLPoint> ArcToPoints (Formulas::LLPoint center, Formulas::LLPoint start, Formulas::LLPoint end){
//Lots of calculations
}
}
我认为一切正常,但当我想要编译时,我收到了这个错误:
未定义对“FVIS::ArcToPoints(Formulas::LLPoint,