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文件导致。

    评论

报告相同问题?

悬赏问题

  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 spring后端vue前端
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题