Reputation: 40150
Further to my previous question, I had an error when trying to call MessageDlg()
[DCC Error] MainForm.pas(54): E2003 Undeclared identifier: 'mtError'
So I pulled up help and found that mtError
is declared in Dialogs
.
I opened Project/Options/Unit scope names and added Dialogs
.
And I still get the same error.
I can has halpz?
Upvotes: 1
Views: 1505
Reputation: 7575
Add Vcl
instead of Dialogs
in Project->Options->Unit scope names
.
Upvotes: 5
Reputation: 125708
This was answered in the second link I posted to your last question (the subtopic Fully Qualified Names Must Include the Unit Scope Name
.
There's something strange about your project, though. If I create a new VCL project (File->New->VCL Forms Application
), and then add the following code, it compiles fine with no changes to default compiler settings.
procedure TForm1.FormCreate(Sender: TObject);
begin
MessageDlg('Test message', mtError, [mbOK], 0);
end;
Upvotes: 4