Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

clang error: unknown argument: '-framework CoreAudio'



  • Hello,

    I have some configuration that used to work with qt 5.5 but is on longer working with Qt5.13

    macx {
    
        LIBS         += "-framework QuartzCore"
        LIBS         += "-framework AudioToolbox"
        LIBS         += "-framework CoreAudio"
        LIBS         += "-framework ApplicationServices"
        LIBS         += "-framework Cocoa"
    }
    

    Did the syntax changed or something ?

    I just a simple code found there : https://stackoverflow.com/questions/42769135/how-do-i-link-core-frameworks-on-macos-using-clang

    and I have the same issue with

    LIBS += "-framework CoreServices"
    LIBS += "-framework CoreAudio"
    

    in my test.pro, but using the command line :

    clang++ -framework CoreServices -framework CoreAudio main.cpp
    

    it works..

    When I look at the compile output (from QtCreator), I have this :

    Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.12
     -Wl,-rpath,@executable_path/../Frameworks -o test main.o   -framework\ CoreServices -framework\ CoreAudio  
    


  • found ! The double quotes are no longer accepted. The space is escaped and I think it make clang search for " CoreAudio" instead of "CoreAudio"... or something close.


Log in to reply