当前位置:网站首页>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}
.
边栏推荐
- [C language] branch and loop statements (Part 1)
- 465. 最优账单平衡 DFS 回溯
- How to convert Quanzhi a40i/t3 to can through SPI
- 拥抱平台化交付的安全理念
- Key wizard play strange learning - multithreaded background coordinate recognition
- Assets, vulnerabilities, threats and events of the four elements of safe operation
- 鏈錶內指定區間反轉
- leetcode:701. 二叉搜索树中的插入操作【bst的插入】
- kivy教程之在 Kivy App 中使用 matplotlib 的示例
- leetcode:701. Insertion in binary search tree [BST insertion]
猜你喜欢
Niu Ke swipes questions and clocks in
[shutter] image component (configure local GIF image resources | load placeholder with local resources)
MySQL
【FH-GFSK】FH-GFSK信号分析与盲解调研究
Basis of information entropy
leetcode:701. Insertion in binary search tree [BST insertion]
Excel if formula determines whether the two columns are the same
MySQL基础用法02
[untitled]
Draw love with go+ to express love to her beloved
随机推荐
按鍵精靈打怪學習-多線程後臺坐標識別
[Arduino experiment 17 L298N motor drive module]
Understanding and distinguishing of some noun concepts in adjustment / filtering
Cut point of undirected graph
matlab查找某一行或者某一列在矩阵中的位置
[AUTOSAR eight OS]
Excel calculates the difference between time and date and converts it into minutes
Embrace the safety concept of platform delivery
leetcode:701. 二叉搜索树中的插入操作【bst的插入】
【FH-GFSK】FH-GFSK信号分析与盲解调研究
18_微信小程序之微信视频号滚动自动播放视频效果实现2.0
465. DFS backtracking of optimal bill balance
Basis of information entropy
Several cases of recursive processing organization
基本远程连接工具Xshell
Merge K sorted linked lists
MySQL foundation 06 DDL
Usage of using clause in kingbases alter table
Button wizard play strange learning - go back to the city to buy medicine and add blood
Linear programming of mathematical modeling (including Matlab code)