2

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?

2
  • Which Gnat versions, which OS? Is the statically linked one mingw (for Windows?) Commented Oct 2, 2014 at 20:43
  • @BrianDrummond Linux only. libgnat-4.9 Commented Oct 4, 2014 at 8:02

1 Answer 1

3

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;

Sign up to request clarification or add additional context in comments.

1 Comment

This fails with: gnatbind: invalid switch: --shared

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.