当前位置:网站首页>d,ldc構建共享庫
d,ldc構建共享庫
2022-07-03 01:18: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}
.
边栏推荐
- 寻找标杆战友 | 百万级实时数据平台,终身免费使用
- 465. DFS backtracking of optimal bill balance
- 比较版本号
- Now that the teenager has returned, the world's fireworks are the most soothing and ordinary people return to work~
- Kivy教程大全之如何在 Kivy 中创建下拉列表
- MySQL basic usage 02
- 无向图的割点
- 2022 cable crane driver examination registration and cable crane driver certificate examination
- excel IF公式判断两列是否相同
- matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
猜你喜欢
Assets, vulnerabilities, threats and events of the four elements of safe operation
攻克哈希的基本概念与实现
Win10 can't be installed in many ways Problems with NET3.5
有向图的强连通分量
Database SQL language 02 connection query
Strongly connected components of digraph
JS inheritance and prototype chain
1696C. Fishingprince plays with array [thinking questions + intermediate state + optimized storage]
Merge K sorted linked lists
MySQL --- 数据库查询 - 基本查询
随机推荐
[day 29] given an integer, please find its factor number
拥抱平台化交付的安全理念
kivy教程之在 Kivy App 中使用 matplotlib 的示例
MySQL basics 03 introduction to MySQL types
按键精灵打怪学习-回城买药加血
[untitled]
按键精灵打怪学习-自动寻路回打怪点
18_ The wechat video number of wechat applet scrolls and automatically plays the video effect to achieve 2.0
excel表格计算时间日期的差值,并转化为分钟数
Database SQL language 02 connection query
465. 最优账单平衡 DFS 回溯
[C language] branch and loop statements (Part 1)
Explain the basic concepts and five attributes of RDD in detail
The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
1038 Recover the Smallest Number
MongoDB系列之MongoDB常用命令
Detailed explanation of Q-learning examples of reinforcement learning
matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
异步、邮件、定时三大任务
leetcode:701. Insertion in binary search tree [BST insertion]