Many importers and converters include files which include windows.h. In mingw, windows.h (and other files) contain a line like:
#define interface struct
...
oof
/* Some kludge for Obj-C.
For Obj-C the 'interface' is a keyword, but interface is used
in midl-code too. To resolve this conflict for at least the
main windows API header, we define it here temporary. */
It obviously does not work well with Corrade::PluginManager::Implementation::StaticPlugin in AbstractManager.h, which contains a const char* interface, and when referenced produces this error for me:
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/oleidl.h:7,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/ole2.h:38,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/wtypes.h:12,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/winscard.h:10,
from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:97,
from C:/git/magnum-plugins/src/external/dr/dr_flac.h:3630,
from C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp:37:
C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp: In function 'int pluginImporter_DrFlacAudioImporter()':
C:/git/magnum-plugins/src/MagnumPlugins/DrFlacAudioImporter/DrFlacImporter.cpp:195:1: error: expected unqualified-id before 'struct'
195 | CORRADE_PLUGIN_REGISTER(DrFlacAudioImporter, Magnum::Audio::DrFlacImporter,
| ^~~~~~~~~~~~~~~~~~~~~~~
I temporarily solved it by slapping an #undef interface right before the CORRADE_PLUGIN_REGISTER.
Many importers and converters include files which include
windows.h. In mingw, windows.h (and other files) contain a line like:#define interface struct...
oof
It obviously does not work well with
Corrade::PluginManager::Implementation::StaticPlugininAbstractManager.h, which contains aconst char* interface, and when referenced produces this error for me:I temporarily solved it by slapping an
#undef interfaceright before theCORRADE_PLUGIN_REGISTER.