Skip to content

Commit

Permalink
fix: link error for testcapi
Browse files Browse the repository at this point in the history
When building the library as a static library it tries to link testcapi
using the C compiler and we get a link error because the C++ support is
missing.

We enable link of testcapi using C++ when shared library is disabled.
  • Loading branch information
franko committed Oct 22, 2024
1 parent 24b3a3b commit ffb9de6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ AS_IF([test "x$AR" = "xno"], [
])

LT_INIT([win32-dll])
AM_CONDITIONAL([enable_shared], [test "$enable_shared" = "yes"])
AC_CONFIG_MACRO_DIR([m4])

# Checks for header files.
Expand Down
3 changes: 3 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ apinames_LDADD = $(top_builddir)/librtmidi.la

testcapi_SOURCES = testcapi.c
testcapi_LDADD = $(top_builddir)/librtmidi.la
if !enable_shared
testcapi_LINK = $(CXXLINK)
endif

EXTRA_DIST = cmidiin.dsp midiout.dsp midiprobe.dsp qmidiin.dsp \
sysextest.dsp RtMidi.dsw
Expand Down

0 comments on commit ffb9de6

Please sign in to comment.