为什么我编译不了exe程序?
提示这个:
[Error] Project1.dpr(5): Declaration expected but identifier 'Unit1' found
[Error] Project1.dpr(20): Undeclared identifier: 'TForm1'
我的项目代码:
- Delphi(Pascal) code
program Project1;uses Forms,windows; Unit1 in 'Unit1.pas' {Form1};{$R *.res} const ClassName='Tform1'; var Handle:integer; begin handle:=findwindow(classname,nil); if handle<>0 then begin messagebox(0,'请不要重复启动!','运行',0); exit; end; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run;end.[解决办法]
- Delphi(Pascal) code
program Project1;uses Forms,windows, //这里是逗号吧! Unit1 in 'Unit1.pas' {Form1};