菜鸟dll,简单的问题

helloha2013 2009-05-09 11:01:22
library mydll;

uses
SysUtils,Classes,Dialogs,windows;

function Triple(N:Integer):integer;stdcall;
begin
result:=N+3;
end;

function Double(N:Integer):integer;stdcall;
begin
result:=N+2;
end;

function Triple1(N:Integer):integer;stdcall;
begin
showmessage('计算N+3');
result:=N+3;
end;

function Double1(N:Integer):integer;stdcall;
begin
messagebox(0,'计算N+2','计算N+2',mb_ok);
result:=N+2;
end;

exports
Triple name 'Tr',
Double name 'Do',
Triple1 name 'TrM',
Double1 name 'DoM',
Triple,Double,Triple1,Double1;

{$R *.RES}
begin
end.


///////以上是我在网上看到的dll入门例子,我把它写道dephi里,没有语法错误,但是我执行run时,确报[DCC Error] E1026 File not found: 'mydll.RES'
请问该怎么办?
...全文
92 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
helloha2013 2009-05-09
  • 打赏
  • 举报
回复
谢谢你们。
lihuasoft 2009-05-09
  • 打赏
  • 举报
回复
其实就象目前你的程序, 把{$R *.RES}这句直接删掉我想也没问题
lihuasoft 2009-05-09
  • 打赏
  • 举报
回复
DLL工程, 可以不要直接RUN生成可执行文件...因为菜单Project中有个Build功能...

至于那个错误提示, 你在复制别人代码时, 不要复制library mydll;这句... 或者你把默认的工程名字Project1改名为mydll...

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧