为了帮助我们模块化单片应用程序,我们正在设置用于调试版本的包,同时仍然编译为发布版本的单个exe.
我们的一个包(EAUtils)包含一个正在生产的单元[DCC Error] E2201 Need imported data reference ($G) to access 'SMsgDlgWarning' from unit 'SystemUtils'.
在构建EAUtils包本身时会发生这种情况.我还没有构建依赖于EAUtils的包.EAUtils仅依赖于rtl/vcl包和我为Jedi WinApi单元创建的包.
这是行的结果:
// This is a TaskDialog override, with the same args as the old MessageDlg.
function TaskDialog(const aContent: string; const Icon: HICON = 0;
const Buttons: TTaskDialogCommonButtonFlags = TDCBF_OK_BUTTON): Integer;
const
Captions: array[TMsgDlgType] of Pointer = (@SMsgDlgWarning, @SMsgDlgError, @SMsgDlgInformation, @SMsgDlgConfirm, nil);
var
aMsgDlgType: TMsgDlgType;
aTitle: string;
begin
aMsgDlgType := TaskDialogIconToMsgDlgType(Icon);
if aMsgDlgType <> mtCustom then
aTitle := LoadResString(Captions[aMsgDlgType])
else
aTitle := …Run Code Online (Sandbox Code Playgroud)