https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80921
--- Comment #14 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > That's not strictly true; while they may not be essential, import libraries > are, by no means, obsolete. The search order, for the Windows linker[1], is: > > libfoo.dll.a > foo.dll.a > libfoo.a > foo.dll > libfoo.dll > > So, unless the foo.dll (or libfoo.dll) is in a different path from libfoo.a, > and that path is searched earlier that the conventional lib path, then -lfoo > will always cause static linking, if libfoo.dll.a is not provided. Also, > when the static library is libfoo.a, and the DLL is qualified by a version > suffix, -lfoo will never find libfoo-N.dll; this entirely defeats the > linker's -Bdynamic vs. -Bstatic selection for -lfoo. I see, thanks for the detailed explanation. There has been a long time since I really toyed with Windows development and I thought that all this non-sense had been eliminated, but apparently not... In any case, the Windows GNAT folks are happy with the current situation.