当前位置:网站首页>D为何链接不了dll
D为何链接不了dll
2022-07-02 10:00:00 【fqbqrr】
module dimedll;
import core.sys.windows.windows;
import core.sys.windows.dll; // 用途?
import std.stdio;
mixin SimpleDllMain;
export void testFunc() {
writeln("DLL内容");
}
//有了`dimedll.dll`和`dimedll.lib`
测试:
//dime.d
import std.stdio;
import core.sys.windows.windows;
import std.stdio : log = writeln;
pragma(lib, "dimedll.lib");
extern void testFunc();
void main() {
log("构建ime");
testFunc();
}
用dmd -i -run dime.d编译出错.
参考地址
只需要标记导出内容并确保名称匹配(包括模块名).方法是删除extern声明.
除非使用optlink作为链接器,不需要.def文件,(原则上,应使用lld或ld代替.)
边栏推荐
- net share
- [true topic of the Blue Bridge Cup trials 43] scratch space flight children's programming explanation of the true topic of the Blue Bridge Cup trials
- 8A Synchronous Step-Down regulator tps568230rjer_ Specification information
- Ali on three sides, it's really difficult to successfully get the offer rated P7
- Everyone wants to eat a broken buffet. It's almost cold
- Counter attack of flour dregs: MySQL 66 questions, 20000 words + 50 pictures in detail! A little six
- Unity skframework framework (XIX), POI points of interest / information points
- 口袋奇兵点评
- Independent and controllable 3D cloud CAD: crowncad enables innovative design of enterprises
- Mysql常用命令详细大全
猜你喜欢

de4000h存储安装配置

上海交大教授:何援军——包围盒(包容体/包围盒子)

【OpenGL】笔记二十九、高级光照(镜面高光)

Unity SKFramework框架(十九)、POI 兴趣点/信息点
![Lucky numbers in the [leetcode daily question] matrix](/img/c8/47a22644bf8cc1f49c5668d72161b6.jpg)
Lucky numbers in the [leetcode daily question] matrix

Professor of Shanghai Jiaotong University: he Yuanjun - bounding box (containment / bounding box)

(7) Web security | penetration testing | how does network security determine whether CND exists, and how to bypass CND to find the real IP
![Jerry's watch gets the default ringtone selection list [article]](/img/94/e469864fa6ab688dabe46f606efdbc.jpg)
Jerry's watch gets the default ringtone selection list [article]

能自动更新的万能周报模板,有手就会用!
![[error record] cannot open](/img/d3/0435ae698ad635be71729c7c047a22.jpg)
[error record] cannot open "XXX" because Apple cannot check whether it contains malware
随机推荐
Redis database persistence
3 a VTT terminal regulator ncp51200mntxg data
Unity SKFramework框架(十九)、POI 兴趣点/信息点
Ali on three sides, it's really difficult to successfully get the offer rated P7
Embedded software development
中文姓名提取(玩具代码——准头太小,权当玩闹)
自主可控三维云CAD:CrownCAD赋能企业创新设计
Record idea shortcut keys
Finally, someone explained the supervised learning clearly
[opencv learning] [Canny edge detection]
Oracle from entry to mastery (4th Edition)
Ruby: how to copy variables without pointing to the same object- Ruby: how can I copy a variable without pointing to the same object?
Day4 operator, self increasing, self decreasing, logical operator, bit operation, binary conversion decimal, ternary operator, package mechanism, document comment
Mobile layout (flow layout)
Std:: vector batch import fast de duplication method
【云原生数据库】遇到慢SQL该怎么办(上)?
JS逆向之巨量创意signature签名
Variable, "+" sign, data type
EasyDSS点播服务分享时间出错如何修改?
运维必备——ELK日志分析系统