qq_34517375 2018-05-23 02:17 采纳率: 50%
浏览 730
已结题

VC出现error LNK2001,但VS没报错,请问可能有哪些问题呢

报错如下

出错的三个函数是某个cpp文件中的。但是这个cpp文件定义了更多其他的函数,只报错了这三个。

VS没问题,VC出错,函数的声明和定义是对应的,还会是什么原因呢?

Linking...
ShortestTime.obj : error LNK2001: unresolved external symbol "double __cdecl RandSolution(struct currentstate,int * const,class myPlatform &)" (?RandSolution@@YANUcurrentstate@@QAHAAVmyPlatform@@@Z)
ShortestTime.obj : error LNK2001: unresolved external symbol "struct state __cdecl TransformState(struct currentstate,class myPlatform *)" (?TransformState@@YA?AUstate@@Ucurrentstate@@PAVmyPlatform@@@Z)
ShortestTime.obj : error LNK2001: unresolved external symbol "struct state __cdecl PreSolution(struct currentstate,int * const,int * const,int * const,double * const,class myPlatform &)" (?PreSolution@@YA?AUstate@@Ucurrentstate@@QAH11QANAAVmyPlatfor
m@@@Z)
Debug/assignment.exe : fatal error LNK1120: 3 unresolved externals
执行 link.exe 时出错.
Creating browse info file...

assignment.exe - 1 error(s), 0 warning(s)

  • 写回答

3条回答 默认 最新

  • weixin_41986182 2018-05-23 02:30
    关注

    像是加载了某个动态库,而那个动态库的lib文件不正确导致。
    可能是你使用了最新的动态库头文件,较旧的lib文件导致。

    评论

报告相同问题?

悬赏问题

  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元