Hi! I noticed that -DDLL_EXPORT didn't appear when I compiled C++ code with MSVC.
I'd like this one to go in before the release. Ok to push? Cheers, Peter >From 0114c5a834fb1ce8e8324ff6d7c0bb782139c3c7 Mon Sep 17 00:00:00 2001 From: Peter Rosin <p...@lysator.liu.se> Date: Fri, 17 Sep 2010 16:15:04 +0200 Subject: [PATCH] Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32. * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2] [pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++. Signed-off-by: Peter Rosin <p...@lysator.liu.se> --- ChangeLog | 6 ++++++ libltdl/m4/libtool.m4 | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44a76e2..dbbc21f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-09-17 Peter Rosin <p...@lysator.liu.se> + + Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32. + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2] + [pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++. + 2010-09-16 Charles Wilson <libt...@cwilson.fastmail.fm> Fix sh.test failure introduced in 72064249 diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 3a4e757..ec7804e 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -3873,6 +3873,12 @@ m4_if([$1], [CXX], [ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) -- 1.7.1