From: Simon Wright on
"Yannick DuchĂȘne (Hibou57)" <yannick_duchene(a)yahoo.fr> writes:

> I am bit surprised, as it should be possible to build a DLL using
> static library. Unfortunately, I have never experimented this with
> GNAT. Anyway, feel free to give more details.

Like I said above, provided you compile the static library in such a way
that it can be used in a dynamic context. With some systems this would
mean you had to compile the static library with -fPIC
(position-independent code).

I expect that what's happening is that - in systems where it's needed -
GNAT is supplying this flag automatically for the dynamic library and
not for the static library. So on those systems linking the dynamic
library against static objects wouldn't work and is disallowed. And in
the interests of portability it's disallowed even on systems where
there's no need for such a flag.

But I don't know.