diff options
author | Davide Beatrici <git@davidebeatrici.dev> | 2020-05-26 00:13:29 +0300 |
---|---|---|
committer | Davide Beatrici <git@davidebeatrici.dev> | 2020-07-11 20:34:49 +0300 |
commit | a8685afe56b4ed78525ecb0c1dc5af4d104e41b9 (patch) | |
tree | 3ea811faa23664b6f0255b9c923e6ed0793e4e53 /src/mumble/WASAPI.cpp | |
parent | 401bceeb32c7283e7a1f901ec8ea54ea22d36381 (diff) |
src/mumble/WASAPI.cpp: fix redefinition with MinGW in protobuf's "strutil.h"
<shlwapi.h> defines "StrCat", resulting in the following issue when compiling WASAPI.cpp with MinGW:
In file included from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/message_lite.h:50:0,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/generated_enum_util.h:36,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/map.h:48,
from /usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/generated_message_table_driven.h:34,
from src/Mumble.pb.h:26,
from ../src/mumble/MainWindow.h:17,
from ../src/mumble/WASAPI.cpp:9:
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:31: error: expected unqualified-id before 'const'
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b);
^
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:31: error: expected ')' before 'const'
In file included from ../src/mumble/WASAPI.h:18:0,
from ../src/mumble/WASAPI.cpp:6:
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:707:24: error: redefinition of 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat'
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
^
/usr/lib/mxe/usr/x86_64-w64-mingw32.static/include/google/protobuf/stubs/strutil.h:706:24: note: 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat' previously declared here
PROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b);
^
Diffstat (limited to 'src/mumble/WASAPI.cpp')
-rw-r--r-- | src/mumble/WASAPI.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mumble/WASAPI.cpp b/src/mumble/WASAPI.cpp index 26f1effd4..c942eab45 100644 --- a/src/mumble/WASAPI.cpp +++ b/src/mumble/WASAPI.cpp @@ -6,6 +6,14 @@ #include "WASAPI.h" #include "WASAPINotificationClient.h" +#ifdef __MINGW32__ +// Fix a redefinition issue in protobuf's "strutil.h" include file: +// "redefinition of 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat'" +# ifdef StrCat +# undef StrCat +# endif +#endif + #include "MainWindow.h" #include "Utils.h" |