I’ve just started using Felgo (and Qt6) after a long time using Qt5. My code needs to use some native MacOS frameworks, most notably CoreMIDI. I’ve used this code for years in Qt5 apps, but now when I try to compile, I get errors like this:
rtmidi/RtMidi.h:633: error: In included file: non-defining declaration of enumeration with a fixed underlying type is only permitted as a standalone declaration; missing list of enumerators?
I can follow these errors through several layers of #includes to Apple’s headers, such as CoreFoundation/CFBase.h, where I see that definitions like this are the cause:
typedef CF_ENUM(CFIndex, CFComparisonResult) {
kCFCompareLessThan = -1L,
kCFCompareEqualTo = 0,
kCFCompareGreaterThan = 1
};
In doing some digging, it seems like the macro used here by Apple uses some non-standard enum definition that Clang used to accept without trouble, but now causes an error.
I figure that you folks at Felgo had to have run into this at some point. I see that this error can be disabled with the -Wno-elaborated-enum-base flag, but I’m not typically a fan of “just turn off the warning” types of “solutions”. How are others handling this issue?