使用PathFileExists函数后的错误,怎么解决?

sms88 sms88 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我的程序是基于对话框模式的,使用下面的函数就会链接出错.我已经包含了头文件#include <shlwapi.h>



GetModuleFileName(NULL,chSelfPath,sizeof(chSelfPath));
char *pSearch=strrchr(chSelfPath,'\\');
pSearch[0]='\0';
strcat(chSelfPath,"\\Config");//文件夹不存在,创建文件夹;
if(!PathFileExists(chSelfPath))
CreateDirectory(chSelfPath,NULL);

--------------------Configuration: test - Win32 Debug--------------------
Linking...
testDlg.obj : error LNK2001: unresolved external symbol __imp__PathFileExistsA@4
Debug/test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

test.exe - 2 error(s), 0 warning(s)
...全文
评论 5
收藏 已收藏
分享
返回顶部
sms88
VC/MFC 16,550 成员 421,606 内容