On 2017-10-28 16:44+0200 Marco Atzeri wrote:

On 28/10/2017 05:38, Alan W. Irwin wrote:
On 2017-10-27 22:31+0200 Marco Atzeri wrote:

On 27/10/2017 09:32, Alan W. Irwin wrote:

Our understanding is the Cygwin naming convention for the various
kinds of libraries would be (in the gnat library case)

dll               cyggnat-6.dll
import library    libgnat-6.dll.a
static library    libgnat.a


Hi Alan,

the understanding is correct, it should be
libgnat-6.dll.a or libgnat.dll.a

Thanks for that confirmation.

However as

$ gnatlink -v -shared hello
GNATLINK 6.4.0
Copyright (C) 1995-2016, Free Software Foundation, Inc.
gcc -c -mtune=generic -march=x86-64 -gnatA -gnatWb -gnatiw -gnatws /tmp/ada/b~hello.adb /usr/bin/gcc.exe b~hello.o ./hello.o -shared -o hello.exe -L./ -L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/adalib/ -lgnat-6 -Wl,--stack=0x2000000 -shared-libgcc /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lgnat-6
collect2: error: ld returned 1 exit status
gnatlink: error when calling /usr/bin/gcc.exe

I suspect the ada package is incomplete, so I raised
the attention of the package maintainer.

https://cygwin.com/ml/cygwin/2017-10/msg00358.html

Hi Marco:

Many thanks (!) for your message to the Cygwin Ada package maintainer
with a clear simple example of the problem. (We were unaware of that
simple Ada example until now, and that is likely to prove useful for
us in the future as well.) If that maintainer is on the ball, I am
pretty confident the net result of your message will be a package fix
that will make our workaround (linking to the dll) for the packaging
issue redundant.

However, until that Cygwin Ada package is fixed we would like to use
that workaround (which so far we have only gotten to work by hand)
from CMake.  So my original general question remains concerning the
best way to get CMake to find dll's.  So far (although we haven't
tried this yet) it appears our best bet is to use find_file (rather
than find_library which appears to be unable to find dll's on the
Cygwin platform) to find that dll for the Cygwin case.  So if anyone
here can suggest a better method of finding dll's on Cygwin, please
let me know.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to