[FFmpeg-devel] [RFC] Add exported global variables to import libraries for WIN32

Tomas Härdin tomas.hardin
Fri Sep 10 16:39:39 CEST 2010


Hi

About two months ago I posted a thread
(https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-July/092654.html) regarding importing the global constants libav* export in MSVC (link.exe). Eventually I figured out that importing the globals rather than adding a function would be a better solution. I went with a __declspec(dllimport) solution, which looked OK until M?ns asked whether it'd work on static builds. It didn't.

After discussing it on IRC we figured out that it can't be solved in the
headers since both static and dynamic libraries might be built at the
same time. It seems that what needs to be done is have the generated
import libraries also import the exported globals, not just the
functions.

I suspect whoever wrote the script that generates the import libraries
knows more about this. The configure script is a bit too big for me to
digest at the moment..

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100910/8647ffe3/attachment.pgp>



More information about the ffmpeg-devel mailing list