【发布时间】:2015-01-13 10:22:12
【问题描述】:
按照此处的说明尝试 PathFileExists:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773584%28v=vs.85%29.aspx
导致链接器错误 LNK2028 和 LNK2019。
这是我的代码:
char buffer1[] = "C:\\temp\\index.xml";
char *lpStr1;
lpStr1 = buffer1;
int retval;
retval = PathFileExistsA(lpStr1);
if (retval == 1 )
{
this->lbl_stat->Text = "File found!";
}else{
this->lbl_stat->Text = "File not found!";
}
【问题讨论】:
-
将 Shlwapi.lib 添加到链接器依赖项列表中。
标签: c++ visual-c++ visual-studio-2008 windows-7-x64