今天把自己程序代码放到别的机器上跑,在自己机器上跑得很成功,但到别的机器上运行时发现在编译时出了这个问题:
Error 1 error LNK1120: 1 unresolved externals
Error 2 error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: class facedata & __thiscall std::vector<class facedata,class std::allocator<class facedata> >::operator[](unsigned int)" (??A?$vector@Vfacedata@@V?$allocator@Vfacedata@@@std@@@std@@QAEAAVfacedata@@I@Z)
整了半个小时,才发现是运行库的设置问题。
解决办法:Properties(属性)-->Configuration Properties(配置属性)-->C/C++-->Code Generation(代码生成)-->Runtime Library(运行库): Multi-threaded Debug DLL (/MDd)(多线程调试DLL(/MDd))