Browse Source

Export C API symbols when compiled with g++

tags/5.1.0
Stephen Sinclair 5 years ago
parent
commit
5f0720fef7
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      Makefile.am
  2. +4
    -0
      rtaudio_c.h

+ 1
- 0
Makefile.am View File

@@ -6,6 +6,7 @@ endif
AM_CXXFLAGS = @visibility@

lib_LTLIBRARIES = %D%/librtaudio.la
%C%_librtaudio_la_CXXFLAGS = -DRTAUDIO_EXPORT
%C%_librtaudio_la_LDFLAGS = -no-undefined -export-dynamic -version-info @SO_VERSION@
%C%_librtaudio_la_SOURCES = \
%D%/RtAudio.cpp \


+ 4
- 0
rtaudio_c.h View File

@@ -2,8 +2,12 @@
#define RTAUDIO_C_H

#if defined(RTAUDIO_EXPORT)
#ifdef WIN32
#define RTAUDIOAPI __declspec(dllexport)
#else
#define RTAUDIOAPI __attribute__((visibility("default")))
#endif
#else
#define RTAUDIOAPI //__declspec(dllimport)
#endif



Loading…
Cancel
Save