text: On Mon, Aug 30, 2010 at 03:19:18PM +0200, Tomas H?rdin wrote: > On Fri, 2010-07-09 at 16:45 +0200, Michael Niedermayer wrote: > > On Thu, Jul 08, 2010 at 02:48:29PM +0200, Tomas H?rdin wrote: > > > Hi > > > > > > While poking around with MinGW compiled lav* DLLs in MSVC I noticed > > > link.exe can't resolve references to av_pix_fmt_descriptors. This is due > > > to how import libraries work, but I'm not an expert. The important thing > > > is that only functions get exported properly - globals don't. > > > > see: > > __declspec(dllexport) > > __attribute__ ((dllexport)) > > --export-all > > msdn > > gcc docs > > I finally got around to poking at this again. Adding > __declspec(dllimport) is enough for the variable to be imported > properly. It's already exported. The attached patch defines a macro > called AV_DLLIMPORT, listed below: > > #ifdef WIN32 > #define AV_DLLIMPORT __declspec(dllimport) > #else > #define AV_DLLIMPORT > #endif > > I'm not sure this is the prettiest solution, but it works well enough on > my Ubuntu machine, in MSYS and in MSVC. > > I. > > /Tomas > > common.h | 10 ++++++++-- > md5.h | 3 ++- > pixdesc.h | 3 ++- > sha1.h | 3 ++- > 4 files changed, 14 insertions(+), 5 deletions(-) > df35a9b6d2178e33054375e739a970c4b1a0536f dllimport.patch this patch should be ok if its shown to actually fix an: <>