Sorry I don't have an actual solution but I do know that the problem is with
libtool, not with any libraries or tools supplied by MinGW. The libtool
restriction of not being able to link against static libraries when building
a shared library is a Unix thing and has no relevance to Windows DLLs, and
you could easily build the DLLs in question if you were not using libtool.
----- Original Message -----
Sent: Tuesday, April 20, 2004 6:46 AM
Subject: [Mingw-users] problem building dlls
> WAS: creating shared libs with mingw
> I work with a project called quakeforge to make sure their windows builds
> work. They have libs and binaries within their source that are build in
> same run.
> You can configure to build the libs as static which are then built into
> main binary, or as shared, which then creates the libs (.o for linux, .dll
> for windows) seperate from the executable.
> The static building within msys works fine, its the shared build that
> when it tries linking against winmm, gdi32 and user32. The resulting
> changes the shared build of a lib into a static build which ultimately
> further on in the build process when its expecting a shared lib.
> The faulure appears to be that the .a's mingw/msys has for windows dll's
> aren't valid for use in shared libs (stated as "I did check the linker
> looking for a file starting with lib* and none of the candidates passed a
> file format test using a file magic." in libtool warnings. Note: replace *
> with winmm, gdi32, user32 or m).
> This used to work in cygwin (cross compile for mingw) untill recently
> now the resulting binaries with the shared libs fail to even start. Which
> lead me to try msys to see if it was a mingw problem. My best guess is
> libtool in mingw or something used in association with it is at fault,
> whether through QF's configure missing a switch/setting or through a bug
> libtool itself.
> Can anyone help resolve this problem. Please take into consideration that
> the build process builds the dll's first then the binary, all in one run.
> Note: another project of mine "wildmidi" has a simular problem in msys, it
> refuses to build the shared lib that is required, and instead tries to
> build the lib as static due to simular reasons.