[libdvdcss-devel] [PATCH 16/25] [RFC] msvc: Define LIBDVDCSS_EXPORTS for proper declspec declaration at build

Diego Biurrun diego at biurrun.de
Wed Nov 5 12:50:26 CET 2014


On Tue, Oct 21, 2014 at 09:07:24PM +0200, Jean-Baptiste Kempf wrote:
> On 21 Oct, Diego Biurrun wrote :
> > On Tue, Oct 21, 2014 at 06:09:52PM +0200, Jean-Baptiste Kempf wrote:
> > > On 20 Oct, Diego Biurrun wrote :
> > > > On Mon, Oct 20, 2014 at 07:20:34PM +0200, Jean-Baptiste Kempf wrote:
> > > > > Le 20/10/2014 11:59, Diego Biurrun a écrit :
> > > > > >
> > > > > >This is untested, somebody with MSVC will need to confirm.
> > > > > >
> > > > > >  msvc/config.h | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > >--- a/msvc/config.h
> > > > > >+++ b/msvc/config.h
> > > > > >@@ -43,4 +43,4 @@
> > > > > >  /* #undef size_t */
> > > > > >  #define HAVE_BROKEN_MKDIR 1
> > > > > >  #define _CRT_SECURE_NO_WARNINGS 1
> > > > > >-
> > > > > >+#define LIBDVDCSS_EXPORTS 1
> > > > > >
> > > > > 
> > > > > I'm really unsure about this.
> > > > 
> > > > Can you test if it works (w/o it)?
> > > 
> > > It seems to work, but that makes no sense.
> > 
> > Do I misunderstand MSVC DLL building completely?  I thought that when
> > compiling a DLL, libdvdcss.dll in this case, you have to mark the symbols
> > you want to export as __declspec(dllexport).  In order for this to happen
> > you have to define LIBDVDCSS_EXPORTS before #including dvdcss/dvdcss.h.
> > 
> > What am I missing?
> 
> This is my understanding too. But it seems to work.
> I need to fire my VS2013 again.

Have you gotten around to testing this? I could now also test if you
gave me a pointer as to how, since I'm a complete newb when it comes to
MSVC and Windows programming.

Diego


More information about the libdvdcss-devel mailing list