> I've just read the manual, and I think import library is still needed here.

Then you need to read it again!

> According to the manual, directly link to DLL is possible, but usually not
> easy to use under Cygwin/MSYS2, because:
> 
> 1. GCC only adds -L<path>/lib by default, while DLLs are usually placed
> under <path>/bin, so you have to manually add a -L for this.

But that's not true for libgnat/libgnarl, see the install tree.

> 2. DLLs are usually versioned, so you can't use -lfoo, but have to use, e.g.
> -lfoo-17

That's automatically done by gnatmake and we need to keep the version number 
because there is no stable ABI for these libraries.

> Regarding 2, I think we can slightly edit the original patch and remove
> $(LIBRARY_VERSION) from import lib, so that we got libgnat.dll.a instead of
> libgnat-17.dll.a, and users can easily link with -lgnat.

> Below is a fixup patch.

No, we definitely do not want that.

-- 
Eric Botcazou


Reply via email to