On 04/27/2011 07:25 AM, Ed Hartnett wrote:
Howdy all!
Hi Ed,
Recently I managed to get my C library building and testing cleanly on
Linux for windows, using mingw32 and wine. This is the greatest idea
since sliced bread. (In fact, I would rather live without sliced bread!)
I am building it like this:
./configure -C --disable-dap --disable-netcdf-4 --disable-fortran --disable-cxx
--build=x86_64-unknown-linux-gnu --host=i686-mingw32&& make -j check
When it builds in the nc_test directory, there is a program (nc_test)
which needs to link to the math library. I have AC_CHECK_LIB(m) in the
configure.ac, so the math library has been found and added to LIBS. But
libtool strips it away!
As I read the above, when make calles libtool, it has the -lm, but when
libtool calls gcc, the -lm is missing.
Any idea what I might be doing wrong here?
It's explicitly removed -
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* |
*-*-haiku*)
# These systems don't actually have a C or math library (as
such)
continue
;;
I don't know what library you need for floor() on mingw, maybe mingwex?
Perhaps try
AC_SEARCH_LIBS([floor],[m minbgwex])
But you'd probably be better waiting for someone who actually has a clue
about mingw to answer :)
Peter
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool