[Top][All Lists]

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

Linking against static libraries in Windows (MSYS)

From: Alex
Subject: Linking against static libraries in Windows (MSYS)
Date: Mon, 27 Jun 2016 15:03:42 +0200

Hello, I wonder if this would be a bug or something directly unsupported.

I'm building a shared library A on Windows using MSYS (bash, gcc, etc.). A depends on B, so it needs to be built first and as long as both are built to be shared libraries everything goes well.

However I'd like to have just a shared library of A (i.e. linking against a static version of B) and to accomplish that I built B as a static library only:

$ ./configure --disable-shared --enable-static --prefix=/usr
$ make && make install

But when I build A afterwards the following warning appears:

*** Warning: This system can not link to static lib archive /usr/lib/
*** 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.

Has anybody come across this? Is there any known fix or workaround?

The libraries I'm building are FLAC and libogg, although it happens with different ones as well.

reply via email to

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