Description
Dears,
I want to use QHotkey as a cmake external project within https://github.com/openfairwind/fairwindsk, in my main CMakeLists.txt I added:
ExternalProject_Add(qhotkey
GIT_REPOSITORY https://github.com/Skycoder42/QHotkey.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION} -DQT_DEFAULT_MAJOR_VERSION=6
TIMEOUT 360
)
set(LIBQHOTKEY ${EXTERNAL_INSTALL_LOCATION}/lib/libqhotkey.a)
...
add_dependencies(${PROJECT_NAME} qhotkey)
...
target_link_libraries(${PROJECT_NAME}
Qt::Core
Qt::Gui
Qt::Widgets
Qt::Network
Qt::WebSockets
Qt::Xml
Qt::Positioning
Qt::WebEngineWidgets
Qt::VirtualKeyboard
...
${LIBQHOTKEY}
)
I'm using an arm64 platform (MacOS 15.2; the QHotkeyTest is compiled correctly and works flawlessly).
But, when I build my project, I receive this message:
Undefined symbols for architecture arm64:
"_GetApplicationEventTarget", referenced from:
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
"_GetEventClass", referenced from:
QHotkeyPrivateMac::hotkeyPressEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
QHotkeyPrivateMac::hotkeyReleaseEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
"_GetEventKind", referenced from:
QHotkeyPrivateMac::hotkeyPressEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
QHotkeyPrivateMac::hotkeyReleaseEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
"_GetEventParameter", referenced from:
QHotkeyPrivateMac::hotkeyPressEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
QHotkeyPrivateMac::hotkeyReleaseEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) in libqhotkey.a4
"_InstallEventHandler", referenced from:
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
"_RegisterEventHotKey", referenced from:
QHotkeyPrivateMac::registerShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
"_TISCopyCurrentASCIICapableKeyboardLayoutInputSource", referenced from:
QHotkeyPrivateMac::nativeKeycode(Qt::Key, bool&) in libqhotkey.a4
"_TISGetInputSourceProperty", referenced from:
QHotkeyPrivateMac::nativeKeycode(Qt::Key, bool&) in libqhotkey.a4
"_UnregisterEventHotKey", referenced from:
QHotkeyPrivateMac::unregisterShortcut(QHotkey::NativeShortcut) in libqhotkey.a4
"_kTISPropertyUnicodeKeyLayoutData", referenced from:
QHotkeyPrivateMac::nativeKeycode(Qt::Key, bool&) in libqhotkey.a4
ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [FairWindSK] Error 1
make[1]: *** [CMakeFiles/FairWindSK.dir/all] Error 2
make: *** [all] Error 2
The symbols are present in libqhotkey.a
Any suggestions?
Best regards,
Raffaele