Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 4 Support (Qt 6) › Compile errors when using MacOS frameworks

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25278

    Ron

    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?

     

    #25281

    Günther
    Felgo Team

    Hi Ron,

    I am not aware that we ran into this specific issue with the native Frameworks that Felgo integrates with.
    Do you maybe include the Framework header from a *.cpp file, instead of a .mm file (objective-c file)? I can imagine this could make a difference, but just a guess.

    Best,
    Günther

    #25283

    Ron

    Hmm. There’s definitely no Objective C in my project, but I’ve been compiling this C++ code for 10+ years and it’s been fine until now. For now, I’ve tried turning off the warning and so far it’s working, but I’ll try to find a more reassuring solution.

     

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded