在代码中,当我使用浮点数据类型时它正在编译,然后在 typedef 中将浮点数更改为双精度时,会出现上述链接错误。
Error 12 fatal error LNK1120: 11 unresolved externals C:\work\eb_adasis_rc_toolbox\build\test1\Debug\executable_prj.exe
Error 2 error LNK2019: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetPointListForDisplay(class std::vector<class ElementApproximator::Point,class std::allocator<class ElementApproximator::Point> > &,class std::vector<double,class std::allocator<double> > &)const " (?GetPointListForDisplay@Clothoid@ElementApproximator@@UBE_NAAV?$vector@VPoint@ElementApproximator@@V?$allocator@VPoint@ElementApproximator@@@std@@@std@@AAV?$vector@NV?$allocator@N@std@@@4@@Z) referenced in function _main executable_prj.obj
Error 1 error LNK2019: unresolved external symbol "public: bool __thiscall ElementApproximator::Point::GetTmcXY(double &,double &)const " (?GetTmcXY@Point@ElementApproximator@@QBE_NAAN0@Z) referenced in function _main executable_prj.obj
Error 3 error LNK2019: unresolved external symbol "public: bool __thiscall ElementApproximator::Clothoid::Init(class ElementApproximator::Point const &,double,double,double,double)" (?Init@Clothoid@ElementApproximator@@QAE_NABVPoint@2@NNNN@Z) referenced in function _main executable_prj.obj
Error 4 error LNK2019: unresolved external symbol "public: __thiscall ElementApproximator::Point::Point(double,double)" (??0Point@ElementApproximator@@QAE@NN@Z) referenced in function _main executable_prj.obj
Error 11 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Element::Translate(double,double)" (?Translate@Element@ElementApproximator@@UAEXNN@Z) executable_prj.obj
Error 10 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Element::Rotate(double)" (?Rotate@Element@ElementApproximator@@UAEXN@Z) executable_prj.obj
Error 9 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Clothoid::Translate(double,double)" (?Translate@Clothoid@ElementApproximator@@UAEXNN@Z) executable_prj.obj
Error 8 error LNK2001: unresolved external symbol "public: virtual void __thiscall ElementApproximator::Clothoid::Rotate(double)" (?Rotate@Clothoid@ElementApproximator@@UAEXN@Z) executable_prj.obj
Error 6 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetTangentGridBearingAtDeltaLength(double,double &)const " (?GetTangentGridBearingAtDeltaLength@Clothoid@ElementApproximator@@UBE_NNAAN@Z) executable_prj.obj
Error 7 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetPointAtDeltaLength(double,class ElementApproximator::Point &)const " (?GetPointAtDeltaLength@Clothoid@ElementApproximator@@UBE_NNAAVPoint@2@@Z) executable_prj.obj
Error 5 error LNK2001: unresolved external symbol "public: virtual bool __thiscall ElementApproximator::Clothoid::GetCurvatureAtDeltaLength(double,double &)const " (?GetCurvatureAtDeltaLength@Clothoid@ElementApproximator@@UBE_NNAAN@Z) executable_prj.obj
我已经看到有关此错误的其他帖子,但无法使用答案中提到的解决方法解决它。感谢您
问候, Mrinal