Dynamically link libgnat

只愿长相守 提交于 2019-12-22 22:17:03

问题


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.

Any idea why it's happening? Do you know a way to force GNAT to dynamically link libraries?


回答1:


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;

end Foo;



来源:https://stackoverflow.com/questions/26167386/dynamically-link-libgnat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!