Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-17 Thread Martin Storsjö
On Mon, 15 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: +#if CONFIG_SHARED defined(_WIN32) !defined(COMPILING_avcodec) +#define avcodec_exportdata __declspec(dllimport) +#else

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-14 Thread Martin Storsjö
On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: +#if CONFIG_SHARED defined(_WIN32) !defined(COMPILING_avcodec) +#define avcodec_exportdata __declspec(dllimport) +#else +#define avcodec_exportdata +#endif I want to think about this some more. Any further

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-14 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes: On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: +#if CONFIG_SHARED defined(_WIN32) !defined(COMPILING_avcodec) +#define avcodec_exportdata __declspec(dllimport) +#else +#define avcodec_exportdata +#endif I want

[libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
From: Ronald S. Bultje rsbul...@gmail.com 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. To properly load

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Diego Biurrun
On Sat, Oct 13, 2012 at 08:23:26PM +0300, Martin Storsjö wrote: From: Ronald S. Bultje rsbul...@gmail.com 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

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes: diff --git a/configure b/configure index 667089b..362f8d1 100755 --- a/configure +++ b/configure @@ -2794,6 +2794,29 @@ case $target_os in add_cppflags -U__STRICT_ANSI__ ;; msvc) +if enabled shared; then +

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: diff --git a/configure b/configure index 667089b..362f8d1 100755 --- a/configure +++ b/configure @@ -2794,6 +2794,29 @@ case $target_os in add_cppflags -U__STRICT_ANSI__ ;; msvc) +

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
On Sat, 13 Oct 2012, Martin Storsjö wrote: diff --git a/library.mak b/library.mak index b365935..318fe86 100644 --- a/library.mak +++ b/library.mak @@ -19,6 +19,7 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm $(DEPYASM) $(YASMFLAGS) -I $(D)/ -M -o $@ $ $(@:.o=.d) $(YASM) $(YASMFLAGS)

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes: On Sat, 13 Oct 2012, Martin Storsjö wrote: diff --git a/library.mak b/library.mak index b365935..318fe86 100644 --- a/library.mak +++ b/library.mak @@ -19,6 +19,7 @@ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm $(DEPYASM) $(YASMFLAGS) -I $(D)/ -M -o $@ $

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Diego Biurrun
On Sat, Oct 13, 2012 at 09:50:59PM +0300, Martin Storsjö wrote: On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: --- a/configure +++ b/configure @@ -2794,6 +2794,29 @@ case $target_os in add_cppflags -U__STRICT_ANSI__ ;; msvc) +

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Hendrik Leppkes
On Sat, Oct 13, 2012 at 9:21 PM, Diego Biurrun di...@biurrun.de wrote: +#if CONFIG_SHARED defined(_MSC_VER) !defined(COMPILING_avcodec) This condition seems a bit too specific. There are other compilers. That might be good for consistency, even if mingw can do without it. So something

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Derek Buitenhuis
On 13/10/2012 3:29 PM, Hendrik Leppkes wrote: ICL on windows mimics MSVCs behaviour rather strictly so it can be used as a more-or-less drop-in replacement, fwiw. With the exception of supporting C99, which I think is being addressed in Adam's patch anyway. - Derek

[libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
From: Ronald S. Bultje rsbul...@gmail.com This requires the makedef perl script by Derek, from the c89-to-c99 repo. That scripts produces a .def file, listing the symbols to be exported, based on the gcc version scripts and the built object files. To properly load non-function symbols from DLL

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Diego Biurrun
On Sat, Oct 13, 2012 at 10:43:19PM +0300, Martin Storsjö wrote: --- configure | 17 + libavcodec/ac3tab.h|3 ++- libavcodec/dca.h |3 ++- libavcodec/internal.h |7 +++ libavcodec/mjpeg.h | 15 ---

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Dave Yeo
On 10/13/12 10:23 am, Martin Storsjö wrote: 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. Where is the makedef

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
On Sat, 13 Oct 2012, Dave Yeo wrote: On 10/13/12 10:23 am, Martin Storsjö wrote: 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

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes: diff --git a/configure b/configure index b30d69b..b70b1ec 100755 --- a/configure +++ b/configure @@ -2794,6 +2794,20 @@ case $target_os in add_cppflags -U__STRICT_ANSI__ ;; win32|win64) +# Link to the import library

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Martin Storsjö
On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: @@ -2930,6 +2944,9 @@ build the shared libraries as well. To only build the shared libraries specify EOF exit 1; fi +if enabled_all msvc static shared; then +die Cannot build shared and static

Re: [libav-devel] [PATCH 2/2] Add support for building shared libraries with MSVC

2012-10-13 Thread Måns Rullgård
Martin Storsjö mar...@martin.st writes: On Sat, 13 Oct 2012, Måns Rullgård wrote: Martin Storsjö mar...@martin.st writes: @@ -2930,6 +2944,9 @@ build the shared libraries as well. To only build the shared libraries specify EOF exit 1; fi +if enabled_all msvc static shared; then