Declaration expected but identifier这个是什么意思??? ( 积分: 100 )

  • 主题发起人 主题发起人 ncj168
  • 开始时间 开始时间
N

ncj168

Unregistered / Unconfirmed
GUEST, unregistred user!
wlibrary ZWBAR;

uses
ComServ,
_DelphiBand in '_DelphiBand.pas',
ZWBAR_TLB in 'ZWBAR_TLB.pas';

exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer;

{$R *.TLB}

{$R *.RES}

begin
end.

构建
[错误] ZWBAR.dpr(1): Declaration expected but identifier 'ZWBAR' found
[错误] ZWBAR.dpr(9): Undeclared identifier: 'DllGetClassObject'
[错误] ZWBAR.dpr(10): Undeclared identifier: 'DllCanUnloadNow'
[错误] ZWBAR.dpr(11): Undeclared identifier: 'DllRegisterServer'
[错误] ZWBAR.dpr(12): Undeclared identifier: 'DllUnregisterServer'
[警告] ZWBAR.dpr(14): File not found: 'wlibrary.TLB'
[警告] ZWBAR.dpr(16): File not found: 'wlibrary.RES'

哪位大哥,解析一下,我是新手
万分感谢
 
wlibrary ZWBAR;

uses
ComServ,
_DelphiBand in '_DelphiBand.pas',
ZWBAR_TLB in 'ZWBAR_TLB.pas';

exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer;

{$R *.TLB}

{$R *.RES}

begin
end.

构建
[错误] ZWBAR.dpr(1): Declaration expected but identifier 'ZWBAR' found
[错误] ZWBAR.dpr(9): Undeclared identifier: 'DllGetClassObject'
[错误] ZWBAR.dpr(10): Undeclared identifier: 'DllCanUnloadNow'
[错误] ZWBAR.dpr(11): Undeclared identifier: 'DllRegisterServer'
[错误] ZWBAR.dpr(12): Undeclared identifier: 'DllUnregisterServer'
[警告] ZWBAR.dpr(14): File not found: 'wlibrary.TLB'
[警告] ZWBAR.dpr(16): File not found: 'wlibrary.RES'

哪位大哥,解析一下,我是新手
万分感谢
 
wlibrary ZWBAR; //这里多了一个w
正确的写法如下:
library ZWBAR;

uses
ComServ,
_DelphiBand in '_DelphiBand.pas',
ZWBAR_TLB in 'ZWBAR_TLB.pas';

exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer;

{$R *.TLB}

{$R *.RES}

begin
end.
 
偶。
谢谢
通过了,不过现在提示这个:
构建
[致命错误] Could not create output file 'C:/Documents and Settings/Administrator/桌面/iebar/IE_BAR/ZWBAR.dll'

是路径不对吗,如何解决?
 
接受答案了.
 
后退
顶部