当前位置:网站首页>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
代替.)
边栏推荐
- Unity SKFramework框架(十八)、RoamCameraController 漫游视角相机控制脚本
- 互联网常见34个术语解释
- Lucky numbers in the [leetcode daily question] matrix
- Jerry's weather code table [chapter]
- (6) Web security | penetration test | network security encryption and decryption ciphertext related features, with super encryption and decryption software
- JS reverse massive creative signature
- Std:: vector batch import fast de duplication method
- 三面阿里,有惊无险成功拿到offer定级P7,只能说是真的难
- [opencv learning] [common image convolution kernel]
- Fundamentals of face recognition (facenet)
猜你喜欢
Fully autonomous and controllable 3D cloud CAD: crowncad's convenient command search can quickly locate the specific location of the required command.
Web基础
West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
(7) Web security | penetration testing | how does network security determine whether CND exists, and how to bypass CND to find the real IP
Three methods of finding LCA of the nearest common ancestor
2022零代码/低代码开发白皮书【伙伴云出品】附下载
Unity SKFramework框架(二十一)、Texture Filter 贴图资源筛选工具
net share
Unity SKFramework框架(十二)、Score 计分模块
阿里初面被两道编程题给干掉,再次内推终上岸(已拿电子offer)
随机推荐
中文姓名提取(玩具代码——准头太小,权当玩闹)
Unity SKFramework框架(十二)、Score 计分模块
Unity skframework framework (XV), singleton singleton
(7) Web security | penetration testing | how does network security determine whether CND exists, and how to bypass CND to find the real IP
伙伴云表格强势升级!Pro版,更非凡!
2、 Frame mode MPLS operation
Clean up system cache and free memory under Linux
【蓝桥杯选拔赛真题43】Scratch航天飞行 少儿编程scratch蓝桥杯选拔赛真题讲解
Unity SKFramework框架(十八)、RoamCameraController 漫游视角相机控制脚本
Jerry's watch stops ringing [article]
TVOC, VOC, VOCs gas detection + Solution
Redis database persistence
Embedded software development
Fully autonomous and controllable 3D cloud CAD: crowncad's convenient command search can quickly locate the specific location of the required command.
解答:EasyDSS视频点播时音频是否可以设置为默认开启?
口袋奇兵点评
JS reverse massive creative signature
Tencent three sides: in the process of writing files, the process crashes, and will the file data be lost?
Jerry's watch delete alarm clock [chapter]
Unity skframework framework (XVIII), roamcameracontroller roaming perspective camera control script