[PATCH] Changing the behaviour of make with default target
Hi, problems with linking the shared libs with m$ toolchain on windows keep coming up again and again. Maybe I am wrong, as I didn't get feedback yet. I for sure know it worked for me, as i had to use libav* with m$ toolchain one time not so long ago. I think part of the problem is that when configured with --enable-shared the static libs and the shared libs get built when using make with default target. The problem on windows is that you use shared libs with an import lib. So what happens normally is that the avcodec.lib is built which is the just static lib and the dll and a def file and, with proper environment setup including m$ lib.exe, also the import lib is built (which is named avcodec.lib and overwrites the static lib). But in case the environment isn't setup properly (no lib.exe in path) the import lib doens't get build and people seem to confuse it with the static lib which doesn't work properly when used with m$ tools. Despite the problem that most of them most probably didn't want to use the static version but the shared one. Make doesn't error out, because the rule is written to silently ignore an error at that place. Maybe because it assumes that many people don't use m$ tools, which would make sense to me. So maybe it would be better to just build the shared lib only by default when configured with --enable-shared. Then ppl would notice there is something missing. This is what the attached patch does. There is still the problem with filename clash tho, but i don't think it will still be that problematic as it is now. People knowing what they are doing will still be able to build both libs. Also a different approach would be to print a big fat warning for m$ devel tool users if the import lib could not be generated. Comments welcome... Alex (beastd)
Alexander Strasser wrote:
problems with linking the shared libs with m$ toolchain on windows keep coming up again and again.
[...]
Make doesn't error out, because the rule is written to silently ignore an error at that place. Maybe because it assumes that many people don't use m$ tools, which would make sense to me.
Ok, slightly wrong. Make prints a one line error (ignored). But I am sure most people don't see it when building from project root. [...]
There is still the problem with filename clash tho, but i don't think it will still be that problematic as it is now. People knowing what they are doing will still be able to build both libs.
After thinking about it a second time, the best thing is maybe just fixing the name clash. I mean all libs that come with mingw for usage with gcc are named .a anyway. Trivial patch attached. [...] Alex (beastd)
Hi On Sunday 31 July 2005 10:34, Alexander Strasser wrote: [...]
There is still the problem with filename clash tho, but i don't think it will still be that problematic as it is now. People knowing what they are doing will still be able to build both libs.
After thinking about it a second time, the best thing is maybe just fixing the name clash. I mean all libs that come with mingw for usage with gcc are named .a anyway. Trivial patch attached.
ok, feel free to apply [...] -- Michael
Michael Niedermayer wrote:
On Sunday 31 July 2005 10:34, Alexander Strasser wrote: [...]
There is still the problem with filename clash tho, but i don't think it will still be that problematic as it is now. People knowing what they are doing will still be able to build both libs.
After thinking about it a second time, the best thing is maybe just fixing the name clash. I mean all libs that come with mingw for usage with gcc are named .a anyway. Trivial patch attached.
ok, feel free to apply
applied Alex (beastd)
participants (2)
-
eclipse7@gmx.net -
michaelni@gmx.at