动态链接libgnat [英] Dynamically link libgnat
本文介绍了动态链接libgnat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编译一个非常简单的 ADA 代码.一切都像一个超级按钮,但是在一台计算机上,我的可执行文件是动态链接到 libgnat 的,而另一台计算机上,它是静态链接的.在这两种情况下,我都使用 gnatmake 工具.
I'm trying to compile a very simple ADA code. Everything works like a charm but on one computer my executable is link dynamically to libgnat whereas on the other computer it's linked statically. In both cases I use gnatmake tool.
知道为什么会这样吗? 您知道强制GNAT动态链接库的方法吗?
Any idea why it's happening? Do you know a way to force GNAT to dynamically link libraries?
推荐答案
这将是活页夹的-shared
开关.如果您正在使用项目文件,则可以使用:
That would be the binder's -shared
switch. If you are using project files, you can use:
project Foo is
...
package Binder is
for Switches ("Ada") use ("-shared");
end Binder;
Foo结束;
这篇关于动态链接libgnat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文