C++ Builder SelectDirectory 函数抛出链接错误

问题描述

我对 SelectDirectory 函数有问题。当我删除 if 语句时,一切正常。

void __fastcall TForm1::Button2Click(TObject *Sender)
{
SHFILEOPSTRUCTW fos;
    fos.hwnd = Handle;
    //operacja kopiowania
    fos.wFunc = FO_copY;
    //plik źródłowy
    fos.pFrom = L"C:\\Melon\\AGA\\Bazy\0"; // don't forget the extra null terminator!
    String Dir;
if(SelectDirectory(Dir,TSelectDirOpts() << sdAllowCreate << sdPerformCreate << sdPrompt,NULL))
    fos.pTo = L"...\0";

}

当存在 if 语句时,抛出以下错误 [ilink32 Error] Error: Unresolved external '__fastcall Vcl::Filectrl::SelectDirectory(System::UnicodeString&,System::Set<Vcl::Filectrl::TSelectDirOpt,2>,int)' referenced from C:\USERS\LEONM\DESKTOP\ARC\WIN32\DEBUG\UNIT1.OBJ。有人可以帮助我吗?我不知道为什么这不起作用,因为在 Builder 6 中它可以工作(现在我使用 10.3)。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)