“ld: framework not found” on full path

I’m getting the error

ld: framework not found /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreAudio.framework

The directory exists (though MacOSX10.14.sdk seems to be a link to the actual directory MacOSX.sdk that is next to it) and contains the CoreAudio framework.

I’m working in CLion on macOS High Sierra (10.13.6).
My CMakeLists contains the following (relevant?) section:

    find_library(AUDIO_TOOLBOX AudioToolbox)
    if (NOT AUDIO_TOOLBOX)
        message(FATAL_ERROR "AudioToolbox not found")
    endif ()

    find_library(CORE_FOUNDATION CoreFoundation)
    if (NOT CORE_FOUNDATION)
        message(FATAL_ERROR "CoreFoundation not found")
    endif ()

    find_library(CORE_SERVICES CoreServices)
    if (NOT CORE_SERVICES)
        message(FATAL_ERROR "CoreServices not found")
    endif ()

    find_library(CORE_AUDIO CoreAudio)
    if (NOT CORE_AUDIO)
        message(FATAL_ERROR "CoreAudio not found")
    endif ()

    set(LINK_LIBRARIES ${LINK_LIBRARIES}
            "-framework AudioToolbox"
            "-framework CoreFoundation"
            "-framework CoreServices"
            "-framework CoreAudio")

and later:

    target_link_libraries(${Target_Name} ${LINK_LIBRARIES})

What am I missing here?

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *