On Sat, Oct 13, 2012 at 08:23:26PM +0300, Martin Storsjö wrote: > From: "Ronald S. Bultje" <[email protected]> > > This requires the makedef perl script by Derek, which probably will > go into the c99-to-c89 repo. That scripts produces a .def file, > listing the symbols to be exported, based on the gcc version > scripts and the built object files.
This part of the commit message reads a bit ad-hoc. It describes the status of the development process at some point in time, but it does not really explain the commit itself. Not that this information would not be helpful, but it should instead be part of a documentation update that describes building shared libs with MSVC. > The __declspec(dllimport) attribute is added via a macro. Since > it has to be present when building code that refer to these symbols, referS > but not be present while building the library that exports the symbols > themselves, the makefile is modified to add a define like Makefile > Also, linking to DLLs is slightly different from linking to shared > libraries on other platforms. DLLs use a thing called import > libraries, which is basically a stub library allowing the linker > know which symbols exist in the DLL and what name the DLL will > have at runtime. to know > In mingw/gcc, the import library is usually named libfoo.dll.a, > which goes next to a static library named libfoo.a. This allows gcc > to pick the dynamic one, if available, from the normal -lfoo switches, > just as it does for libfoo.a vs libfoo.so on unix. On MSVC however, Unix > --- a/configure > +++ b/configure > @@ -2794,6 +2794,29 @@ case $target_os in > add_cppflags -U__STRICT_ANSI__ > ;; > msvc) > + if enabled shared; then > + # Link to the import library instead of the > + # normal static library. Merge those two lines, they are not too long. > + LD_LIB='%.lib' > + enabled static && > + die "Cannot build shared and static libraries at the same > time with MSVC." > + fi > + LIBTARGET=i386 > + if enabled x86_64; then > + LIBTARGET=x64 > + fi enabled x86_64 && In general this does LGTM, but wait for more voices; it sure made enormous progress since the initial version... Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
