在MFC的cpp文件里头需要使用PathFileExists API,故导入下列lib:
#pragma comment(lib, "Shlwapi.lib") //仅为了使用API PathFileExists
#include "Shlwapi.h"
结果在debug版本可以编译过,而在release版本则爆出很多链接错误:
Linking...
error LNK2001: unresolved external symbol __except_list
error LNK2001: unresolved external symbol __except_list
error LNK2001: unresolved external symbol __except_list
error LNK2001: unresolved external symbol __except_list
error LNK2001: unresolved external symbol __fltused
error LNK2001: unresolved external symbol __fltused
error LNK2001: unresolved external symbol "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z)
error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall exception::exception(char const * const &)" (__imp_??0exception@@QAE@ABQBD@Z)
error LNK2001: unresolved external symbol __CxxThrowException@8
error LNK2001: unresolved external symbol __CxxThrowException@8
error LNK2001: unresolved external symbol __chkstk
error LNK2001: unresolved external symbol __alloca_probe
error LNK2001: unresolved external symbol __alloca_probe
error LNK2001: unresolved external symbol __alloca_probe
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
fatal error LNK1120: 9 unresolved externals
调整了下下列语句的位置,没有效果,求help
#pragma comment(lib, "Shlwapi.lib") //仅为了使用API PathFileExists
#include "Shlwapi.h"
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课