错误LNK2019:未解决的外部符号

error LNK2019: unsolved external symbol?

本文关键字:外部 符号 未解决 LNK2019 错误      更新时间:2023-10-16

我正在与Cplex和visual studio 2010合作。我添加了include并链接了.lib。我有很多错误,如下所示:

  • 错误1

    error LNK2019: unresolved external symbol "public: void __thiscall IloAlgorithm::extract(class IloModel)const "
    (?extract@IloAlgorithm@@QBEXVIloModel@@@Z) referenced in function
    _main   C:UsersyasmineDocumentsVisual Studio 2010ProjectsNursesAllocationNursesAllocationNursesAllocation.obj
    
  • 错误2

    error LNK2019: unresolved external symbol "public: __thiscall IloCplex::IloCplex(class IloEnv)"
    (??0IloCplex@@QAE@VIloEnv@@@Z) referenced in function
    _main   C:UsersyasmineDocumentsVisual Studio 2010ProjectsNursesAllocationNursesAllocationNursesAllocation.obj
    

拜托,你能帮我解决这个问题吗?

我遇到了同样的问题,我解决了它,包括ilocplex.lib到其他依赖项。但是,我有适用于Visual Studio 2008的Cplex。