当前位置:网站首页>d,ldc构建共享库
d,ldc构建共享库
2022-07-03 00:59:00 【fqbqrr】
module dimedll;
export void testFunc() {
// 仅用`-fvisibility=hidden`编译时,需要export
import std.stdio;
writeln("This is from dll");
}
用ldc2 -shared dimedll.d
生成lib/dll
.
import dimedll : testFunc;
pragma(lib, "dimedll");
void main() {
import std.stdio;
writeln("构建ime");
testFunc();
}
用ldc2 -link-defaultlib-shared dime.d
生成带dimedll.dll
的exe
Posix
中区别是,不是用pragma(lib)
,你要用-L-ldimedll
链接至libdimedll.{so,dylib}
.
边栏推荐
- Kivy教程大全之如何在 Kivy 中创建下拉列表
- leetcode:701. Insertion in binary search tree [BST insertion]
- RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide
- Linear programming of mathematical modeling (including Matlab code)
- Specified interval inversion in the linked list
- Key wizard hit strange learning - automatic path finding back to hit strange points
- 链表中的节点每k个一组翻转
- Thank you for being together for these extraordinary two years!
- 【无标题】
- leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]
猜你喜欢
dotConnect for PostgreSQL数据提供程序
数据分析思维分析犯法和业务知识——分析方法(一)
Database SQL language 01 where condition
Telephone network problems
信息熵的基础
12_ Implementation of rolling automatic video playback effect of wechat video number of wechat applet
[AUTOSAR II appl overview]
RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide
leetcode 2097 — 合法重新排列数对
Basic remote connection tool xshell
随机推荐
Basic use of sringcloud & use of component Nacos
MySQL基础用法02
matlab查找某一行或者某一列在矩阵中的位置
Machine learning terminology
合并K个已排序的链表
ROS2之ESP32简单速度消息测试(极限频率)
异步、郵件、定時三大任務
Infrared thermography temperature detection system based on arm rk3568
Draw love with go+ to express love to her beloved
[Arduino experiment 17 L298N motor drive module]
【C语言】分支和循环语句(上)
Understanding and distinguishing of some noun concepts in adjustment / filtering
【第29天】给定一个整数,请你求出它的因子数
Every k nodes in the linked list are flipped
leetcode 6103 — 从树中删除边的最小分数
kivy教程之在 Kivy App 中使用 matplotlib 的示例
Data analysis, thinking, law breaking and professional knowledge -- analysis method (I)
leetcode 2097 — 合法重新排列数对
数据分析思维分析犯法和业务知识——分析方法(一)
MySQL foundation 05 DML language