Subject: Re: bug#14055: windows link problem with ".lib" files

From: Peter Rosin <[email-masked]>
Date: Tue, 26 Mar 2013 15:05:28 +0100

On 2013-03-26 10:38, Andreas Otto wrote:
> Hi,
> 
> from time to time I use my automake/libtool project to build libraries on windows ...
> this create al least problems ...
> 
> my actual problem is, I got a tcl distrubution from activestate providing a libraray:
> 
> C:/Tcl/lib/tcl8.6.lib
> 
> and using the libtool command:
> 
> 
> with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ...

It would help if you quoted the error message.

> using the "--debug" option give a hint ....

It would help if you shared the hint.

> libtool does not serach for the "right" name ...
> 
> If I copy the file tcl86.lib to libtcl86.a in the same directory ....
> 
> => everything works fine.
> 
> and now my question:
> 
> why does "libtool" on "windows" does NOT search for "*.lib" files

I'll try to answer when you have provided the above details.

> => enduser would be happy to save debugging hours ;-)
> 
> Hint, I use the mingw cross compiler but this is NOT the problem.

Since you are using a cross compiler (presumably still from Cygwin),
you should not feed it Windows paths, you should feed it POSIX
paths. I.e. something like "-L/cygdrive/c/Tcl/lib -ltcl86". In addition
to that, you (or the package) have specified the library before any
object files, which is not the right thing to do. Try this:

Cheers,
Peter