From a6c85286fef1df3f8f025ee6012796898fc5d77f Mon Sep 17 00:00:00 2001 From: John Emmas Date: Sat, 31 Aug 2013 16:19:36 +0100 Subject: 'libs/panners' - Add a conventional 'C' API call type to test building with MSVC --- libs/ardour/ardour/panner.h | 3 +++ libs/panners/1in2out/panner_1in2out.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 7ebf1ec989..c23d3bd33f 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -47,9 +47,11 @@ #if defined(BUILDING_ARDOURPANNERS) #define ARDOURPANNER_API __declspec(dllexport) #define ARDOURPANNER_APICALLTYPE __thiscall + #define ARDOURPANNER_CAPICALLTYPE __cdecl #elif defined(COMPILER_MSVC) || defined(COMPILER_MINGW) // Probably needs Cygwin too, at some point #define ARDOURPANNER_API __declspec(dllimport) #define ARDOURPANNER_APICALLTYPE __thiscall + #define ARDOURPANNER_CAPICALLTYPE __cdecl #else #error "Attempting to define __declspec with an incompatible compiler !" #endif @@ -57,6 +59,7 @@ // Other compilers / platforms could be accommodated here #define ARDOURPANNER_API #define ARDOURPANNER_APICALLTYPE + #define ARDOURPANNER_CAPICALLTYPE #endif namespace ARDOUR { diff --git a/libs/panners/1in2out/panner_1in2out.cc b/libs/panners/1in2out/panner_1in2out.cc index ef70a11dc9..79a63a2b47 100644 --- a/libs/panners/1in2out/panner_1in2out.cc +++ b/libs/panners/1in2out/panner_1in2out.cc @@ -67,7 +67,7 @@ static PanPluginDescriptor _descriptor = { Panner1in2out::factory }; -extern "C" { PanPluginDescriptor* panner_descriptor () { return &_descriptor; } } +extern "C" { ARDOURPANNER_API PanPluginDescriptor* ARDOURPANNER_CAPICALLTYPE panner_descriptor () { return &_descriptor; } } Panner1in2out::Panner1in2out (boost::shared_ptr p) : Panner (p) -- cgit v1.2.3