libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cygwin/MinGW cross-compilation issue


From: Ralph Schleicher
Subject: Cygwin/MinGW cross-compilation issue
Date: 07 Dec 2006 22:47:50 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

libtool 1.5.22

Hi,

is there any reason why /lib/w32api is not part of the system library
search path when cross-compiling on Cygwin for MinGW?  For example,

linking a shared library with -lws2_32:
*** Warning: linker path does not have real file for library -lws2_32.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libws2_32.a but no candidates were found. (...for file magic test)

linking a shared library with -L/lib/w32api -lws2_32:
Libtool creates a shared library as requested.

When linking with plain 'gcc -v -mno-cygwin ... -lws2_32' I can see that
the linker finds /lib/w32api/libws2_32.a although /lib/w32api is not
listed in 'gcc -print-search-dirs'.  Here's a patch.

--- libtool-1.5.22/libtool.m4.~1~       2005-12-18 22:53:17.000000000 +0100
+++ libtool-1.5.22/libtool.m4   2006-12-07 22:45:55.000000000 +0100
@@ -1342,6 +1342,7 @@
       else
         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e 
"s/$PATH_SEPARATOR/ /g"`
       fi
+      sys_lib_search_path_spec="/lib/w32api $sys_lib_search_path_spec"
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'


Thanks,

-- 
Ralph




reply via email to

[Prev in Thread] Current Thread [Next in Thread]