本文介绍了我收到错误LNK2019:未解析的外部符号。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞!1>RobotModel.obj : error LNK2019: unresolved external symbol "public: double __thiscall CRobotModel::get_timeseries_derivative(double,double,double,double)" (?get_timeseries_derivative@CRobotModel@@QAENNNNN@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CMatrix3 __thiscall CRobotModel::get_rot(int,double)" (?get_rot@CRobotModel@@QAE?AVCMatrix3@@HN@Z) referenced in function "public: void __thiscall CRobotModel::initRobotR(void)" (?initRobotR@CRobotModel@@QAEXXZ)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CMatrix4 __thiscall CRobotModel::get_xyzp_i(class CVector3 * const,class CVector3,class CMatrix3,class CVector3)" (?get_xyzp_i@CRobotModel@@QAE?AVCMatrix4@@QAVCVector3@@V3@VCMatrix3@@1@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CMatrix3 __thiscall CRobotModel::get_d_xyz(int,class CVector3 (* const)[3],class CVector3 * const,double * const)" (?get_d_xyz@CRobotModel@@QAE?AVCMatrix3@@HQAY02VCVector3@@QAV3@QAN@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CVector3 __thiscall CRobotModel::get_d_p_i_from_xyz_prev(class CVector3,class CVector3,class CVector3 * const)" (?get_d_p_i_from_xyz_prev@CRobotModel@@QAE?AVCVector3@@V2@0QAV2@@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CVector3 __thiscall CRobotModel::get_w_i(int,class CVector3 * const,double * const)" (?get_w_i@CRobotModel@@QAE?AVCVector3@@HQAV2@QAN@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CVector3 __thiscall CRobotModel::get_d_q_i(class CVector3,class CVector3)" (?get_d_q_i@CRobotModel@@QAE?AVCVector3@@V2@0@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CVector3 __thiscall CRobotModel::get_dd_p_i(class CVector3,class CVector3,class CVector3,class CVector3,class CVector3 * const)" (?get_dd_p_i@CRobotModel@@QAE?AVCVector3@@V2@000QAV2@@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: double __thiscall CRobotModel::get_dd_th(double,double,double,double)" (?get_dd_th@CRobotModel@@QAENNNNN@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>RobotModel.obj : error LNK2019: unresolved external symbol "public: class CVector3 __thiscall CRobotModel::get_d_w_i(class CVector3,class CVector3,double,class CVector3,double)" (?get_d_w_i@CRobotModel@@QAE?AVCVector3@@V2@0N0N@Z) referenced in function "public: void __thiscall CRobotModel::moveRobot(double * const)" (?moveRobot@CRobotModel@@QAEXQAN@Z)1>C:\Users\ulfa\Documents\Visual Studio 2012\Projects\dlggl_base 2 (RobotGA)\dlggl_base 2\Debug\DlgGL_Base.exe : fatal error LNK1120: 10 unresolved externals========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== 我尝试了什么: 我尝试了一些方法来解决关键字错误LNK2019,但它没有解决我的错误。因此,在这种情况下,当我双击错误时,它不会导致我错误。有谁知道如何解决这个错误?What I have tried:I tried some ways to solve it with keyword error LNK2019 but it didn't solve my error. So, in this case, when I double click the error, it did not lead me to the error. Is anyone know how to solve this errors?推荐答案您必须将您的应用程序链接到包含 CRobotModel中这些符号的目标文件或库 class。 如果这些文件包含在源文件中,请将它们添加到项目中,以便在编译期间创建相应的目标文件。构建过程。 如果它们在库(name.dll和name.lib)中,请将库添加到链接器部分的项目设置中(其他依赖项) )或使用You have to link your application with the object files or libraries containing those symbols from the CRobotModel class.If those are contained in source files, add them to your project so that the corresponding object files are created by compiling them during the build process.If they are in a library (name.dll and name.lib), add the library to your project settings in the Linker section (additional dependencies) or by using#pragma comment(lib, "path_to_library_file") 在你的一个源文件之上。on top of one of your source files.该消息是链接器的真实情况。它缺少代码。 所以你必须按照添加现有文件......将RobotModel.cpp添加到你的项目中。 或者你没有写过文件包含代码,但只创建了标题?然后,您必须使用空函数创建该文件并添加它。The message is the truth for the linker. It is missing the code.So you must add the RobotModel.cpp to you project per "Add existing file...".Or havent you written the file with code yet but only created the header? Then you must create that file with empty functions and add it. 这篇关于我收到错误LNK2019:未解析的外部符号。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS! 05-24 23:29