报错如下
出错的三个函数是某个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)