qwindowkit icon indicating copy to clipboard operation
qwindowkit copied to clipboard

linkage error with QWINDOWKIT_BUILD_STATIC=ON

Open micpub opened this issue 1 year ago • 11 comments

/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgentPrivate::QuickWindowAgentPrivate()': quickwindowagent.cpp:(.text+0x49): undefined reference to QWK::WindowAgentBasePrivate::WindowAgentBasePrivate()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::setup(QQuickWindow*)': quickwindowagent.cpp:(.text+0x102): undefined reference to QWK::WindowAgentBasePrivate::setup(QObject*, QWK::WindowItemDelegate*)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::setTitleBar(QQuickItem*)': quickwindowagent.cpp:(.text+0x169): undefined reference to QWK::AbstractWindowContext::setTitleBar(QObject*)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::setSystemButton(QWK::WindowAgentBase::SystemButton, QQuickItem*)': quickwindowagent.cpp:(.text+0x1d9): undefined reference to QWK::AbstractWindowContext::setSystemButton(QWK::WindowAgentBase::SystemButton, QObject*)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::QuickWindowAgent(QWK::QuickWindowAgentPrivate&, QObject*)': quickwindowagent.cpp:(.text+0x351): undefined reference to QWK::WindowAgentBase::WindowAgentBase(QWK::WindowAgentBasePrivate&, QObject*)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgentPrivate::~QuickWindowAgentPrivate()': quickwindowagent.cpp:(.text+0x13): undefined reference to QWK::WindowAgentBasePrivate::~WindowAgentBasePrivate()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::~QuickWindowAgent()': quickwindowagent.cpp:(.text+0x93): undefined reference to QWK::WindowAgentBase::~WindowAgentBase()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::setHitTestVisible(QQuickItem const*, bool)': quickwindowagent.cpp:(.text+0x330): undefined reference to QWK::AbstractWindowContext::setHitTestVisible(QObject const*, bool)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function QWK::QuickWindowAgent::QuickWindowAgent(QWK::QuickWindowAgentPrivate&, QObject*) [clone .cold]': quickwindowagent.cpp:(.text.unlikely+0x1a): undefined reference to QWK::WindowAgentBase::~WindowAgentBase()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o):(.data.rel.ro._ZTIN3QWK23QuickWindowAgentPrivateE[_ZTIN3QWK23QuickWindowAgentPrivateE]+0x10): undefined reference to typeinfo for QWK::WindowAgentBasePrivate' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o):(.data.rel.ro._ZTVN3QWK23QuickWindowAgentPrivateE[_ZTVN3QWK23QuickWindowAgentPrivateE]+0x20): undefined reference to QWK::WindowAgentBasePrivate::createContext() const' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o): in function QWK::QuickItemDelegate::QuickItemDelegate()': quickitemdelegate.cpp:(.text+0x319): undefined reference to QWK::WindowItemDelegate::WindowItemDelegate()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o): in function QWK::QuickItemDelegate::~QuickItemDelegate()': quickitemdelegate.cpp:(.text+0x23): undefined reference to QWK::WindowItemDelegate::~WindowItemDelegate()' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTIN3QWK17QuickItemDelegateE[_ZTIN3QWK17QuickItemDelegateE]+0x10): undefined reference to typeinfo for QWK::WindowItemDelegate' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTVN3QWK17QuickItemDelegateE[_ZTVN3QWK17QuickItemDelegateE]+0x70): undefined reference to QWK::WindowItemDelegate::resetQtGrabbedControl(QObject*) const' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTVN3QWK17QuickItemDelegateE[_ZTVN3QWK17QuickItemDelegateE]+0xb0): undefined reference to QWK::WindowItemDelegate::createWinIdEventFilter(QObject*, QWK::AbstractWindowContext*) const' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function QWK::QuickWindowAgent::qt_metacall(QMetaObject::Call, int, void**)': mocs_compilation_Release.cpp:(.text+0x365): undefined reference to QWK::WindowAgentBase::qt_metacall(QMetaObject::Call, int, void**)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function QWK::QuickWindowAgent::qt_metacast(char const*)': mocs_compilation_Release.cpp:(.text+0x335): undefined reference to QWK::WindowAgentBase::qt_metacast(char const*)' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function QtPrivate::MetaObjectForType<QWK::WindowAgentBase::SystemButton, void>::metaObjectFunction(QtPrivate::QMetaTypeInterface const*)': mocs_compilation_Release.cpp:(.text._ZN9QtPrivate17MetaObjectForTypeIN3QWK15WindowAgentBase12SystemButtonEvE18metaObjectFunctionEPKNS_18QMetaTypeInterfaceE[_ZN9QtPrivate17MetaObjectForTypeIN3QWK15WindowAgentBase12SystemButtonEvE18metaObjectFunctionEPKNS_18QMetaTypeInterfaceE]+0x7): undefined reference to QWK::WindowAgentBase::staticMetaObject' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function QtPrivate::QDebugStreamOperatorForType<QWK::WindowAgentBase::SystemButton, true>::debugStream(QtPrivate::QMetaTypeInterface const*, QDebug&, void const*)': mocs_compilation_Release.cpp:(.text._ZN9QtPrivate27QDebugStreamOperatorForTypeIN3QWK15WindowAgentBase12SystemButtonELb1EE11debugStreamEPKNS_18QMetaTypeInterfaceER6QDebugPKv[_ZN9QtPrivate27QDebugStreamOperatorForTypeIN3QWK15WindowAgentBase12SystemButtonELb1EE11debugStreamEPKNS_18QMetaTypeInterfaceER6QDebugPKv]+0x16): undefined reference to QWK::WindowAgentBase::staticMetaObject' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function QtPrivate::QMetaTypeForType<QWK::WindowAgentBase::SystemButton>::getLegacyRegister()::{lambda()#1}::_FUN()': mocs_compilation_Release.cpp:(.text._ZZN9QtPrivate16QMetaTypeForTypeIN3QWK15WindowAgentBase12SystemButtonEE17getLegacyRegisterEvENUlvE_4_FUNEv[_ZZN9QtPrivate16QMetaTypeForTypeIN3QWK15WindowAgentBase12SystemButtonEE17getLegacyRegisterEvENUlvE_4_FUNEv]+0x5b): undefined reference to QWK::WindowAgentBase::staticMetaObject' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o):(.data.rel.ro+0xc0): undefined reference to QWK::WindowAgentBase::staticMetaObject' /usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.6.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o):(.data.rel.ro._ZTIN3QWK16QuickWindowAgentE[_ZTIN3QWK16QuickWindowAgentE]+0x10): undefined reference to typeinfo for QWK::WindowAgentBase' collect2: error: ld returned 1 exit status make: *** [Makefile:1373: ../bin/nextrader-rel] Error 1 13:34:27: The process "/usr/bin/make" exited with code 2. Error while building/deploying project ngstock (kit: Desktop Qt 6.6.1 GCC 64bit) When executing step "Make"`

included in the pro file: include(../deps/qwindowkit/out_qt$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}/share/QWindowKit/qmake/QWKQuick.pri)

downloaded and compiled with - sorry these comes from my build scripts - options can be seen: git clone --recursive https://github.com/stdware/qwindowkit eval '$cmakeBin -B cmake-build -S . -DCMAKE_PREFIX_PATH="$qtCmakePrefixPath" -DQWINDOWKIT_BUILD_STATIC=ON -DQWINDOWKIT_BUILD_WIDGETS=OFF -DQWINDOWKIT_BUILD_QUICK=ON -DQWINDOWKIT_BUILD_EXAMPLES=OFF -DQWINDOWKIT_BUILD_DOCUMENTATIONS=OFF -DCMAKE_INSTALL_PREFIX=./out_qt${USE_QT_VERSION} -G "Ninja Multi-Config"' eval "$cmakeBin --build cmake-build --target install --config Release"

platform: ubuntu 23.10 x86-64 qt: 6.6.1

with QWINDOWKIT_BUILD_STATIC=OFF it works good but i want to statically compile it into the app like i was doing with the frameless helper lib

micpub avatar May 09 '24 11:05 micpub

same problem occurs with 'quick' example put this into for example quick-demo.pro TEMPLATE = app TARGET = QWindowKit-Demo-Quick QT += qml quick quickcontrols2 include(../../out_qt$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}/share/QWindowKit/qmake/QWKQuick.pri) SOURCES += main.cpp RESOURCES += qml.qrc

adjust include path (statically compiled lib) it will give the very same linkage errors btw. compiling example via cmake works just fine either some problem with these .pri files or smth in the cmake (but i have no idea where)

micpub avatar May 13 '24 09:05 micpub

I'll watch this.

SineStriker avatar May 15 '24 02:05 SineStriker

Some symbols missing from the library you linked, please check whether you are truly building in static configuration or not, most likely there's something wrong in your toolchain or environment

wangwenx190 avatar May 28 '24 05:05 wangwenx190

this is the command that i am building with: i believe it should be correct right? it compiles correctly, i am seeing the built lib files (both quick and the core)

cmake -B cmake-build -S . -DCMAKE_PREFIX_PATH="/media/data/devel/qt/6.7.1/lib/cmake" -DQWINDOWKIT_BUILD_STATIC=ON -DQWINDOWKIT_BUILD_WIDGETS=OFF -DQWINDOWKIT_BUILD_QUICK=ON -DQWINDOWKIT_BUILD_EXAMPLES=OFF -DQWINDOWKIT_BUILD_DOCUMENTATIONS=OFF -DCMAKE_INSTALL_PREFIX=./out_qt6.7.1 -G "Ninja Multi-Config"

cmake --build cmake-build --target install --config Release

can you confirm that it works for you? you can build the example using .pro (qmake) and link it to the static libs?

micpub avatar May 28 '24 10:05 micpub

btw. building the xample using cmake works correctly it doesnt work using qmake (.pro file) - ive provided it in the first 'comment'

micpub avatar May 28 '24 10:05 micpub

Try with the latest commit please

SineStriker avatar May 30 '24 07:05 SineStriker

btw. building the xample using cmake works correctly it doesnt work using qmake (.pro file) - ive provided it in the first 'comment'

Sorry I missed this important information. Previously the qmake project file doesn't have proper support for static libraries. Now it should be fixed with latest commit. Please try again.

wangwenx190 avatar May 30 '24 08:05 wangwenx190

the bug still exists.

newest code:

commit 2405bec2756ed88013f5a7f17d37b8747bc3028e (HEAD -> main, origin/main, origin/HEAD)
Author: Sine Striker <[email protected]>
Date:   Thu May 30 15:41:42 2024 +0800

    Fix static macro in QMake

compilation errors:

/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgentPrivate::QuickWindowAgentPrivate()':
quickwindowagent.cpp:(.text+0x49): undefined reference to `QWK::WindowAgentBasePrivate::WindowAgentBasePrivate()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::setup(QQuickWindow*)':
quickwindowagent.cpp:(.text+0x102): undefined reference to `QWK::WindowAgentBasePrivate::setup(QObject*, QWK::WindowItemDelegate*)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::setTitleBar(QQuickItem*)':
quickwindowagent.cpp:(.text+0x169): undefined reference to `QWK::AbstractWindowContext::setTitleBar(QObject*)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::setSystemButton(QWK::WindowAgentBase::SystemButton, QQuickItem*)':
quickwindowagent.cpp:(.text+0x1d9): undefined reference to `QWK::AbstractWindowContext::setSystemButton(QWK::WindowAgentBase::SystemButton, QObject*)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::QuickWindowAgent(QWK::QuickWindowAgentPrivate&, QObject*)':
quickwindowagent.cpp:(.text+0x351): undefined reference to `QWK::WindowAgentBase::WindowAgentBase(QWK::WindowAgentBasePrivate&, QObject*)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgentPrivate::~QuickWindowAgentPrivate()':
quickwindowagent.cpp:(.text+0x13): undefined reference to `QWK::WindowAgentBasePrivate::~WindowAgentBasePrivate()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::~QuickWindowAgent()':
quickwindowagent.cpp:(.text+0x93): undefined reference to `QWK::WindowAgentBase::~WindowAgentBase()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::setHitTestVisible(QQuickItem const*, bool)':
quickwindowagent.cpp:(.text+0x330): undefined reference to `QWK::AbstractWindowContext::setHitTestVisible(QObject const*, bool)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o): in function `QWK::QuickWindowAgent::QuickWindowAgent(QWK::QuickWindowAgentPrivate&, QObject*) [clone .cold]':
quickwindowagent.cpp:(.text.unlikely+0x1a): undefined reference to `QWK::WindowAgentBase::~WindowAgentBase()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o):(.data.rel.ro._ZTIN3QWK23QuickWindowAgentPrivateE[_ZTIN3QWK23QuickWindowAgentPrivateE]+0x10): undefined reference to `typeinfo for QWK::WindowAgentBasePrivate'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickwindowagent.cpp.o):(.data.rel.ro._ZTVN3QWK23QuickWindowAgentPrivateE[_ZTVN3QWK23QuickWindowAgentPrivateE]+0x20): undefined reference to `QWK::WindowAgentBasePrivate::createContext() const'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o): in function `QWK::QuickItemDelegate::QuickItemDelegate()':
quickitemdelegate.cpp:(.text+0x2b9): undefined reference to `QWK::WindowItemDelegate::WindowItemDelegate()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o): in function `QWK::QuickItemDelegate::~QuickItemDelegate()':
quickitemdelegate.cpp:(.text+0x23): undefined reference to `QWK::WindowItemDelegate::~WindowItemDelegate()'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTIN3QWK17QuickItemDelegateE[_ZTIN3QWK17QuickItemDelegateE]+0x10): undefined reference to `typeinfo for QWK::WindowItemDelegate'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTVN3QWK17QuickItemDelegateE[_ZTVN3QWK17QuickItemDelegateE]+0x68): undefined reference to `QWK::WindowItemDelegate::resetQtGrabbedControl(QObject*) const'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(quickitemdelegate.cpp.o):(.data.rel.ro._ZTVN3QWK17QuickItemDelegateE[_ZTVN3QWK17QuickItemDelegateE]+0xa8): undefined reference to `QWK::WindowItemDelegate::createWinIdEventFilter(QObject*, QWK::AbstractWindowContext*) const'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function `QWK::QuickWindowAgent::qt_metacall(QMetaObject::Call, int, void**)':
mocs_compilation_Release.cpp:(.text+0x365): undefined reference to `QWK::WindowAgentBase::qt_metacall(QMetaObject::Call, int, void**)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function `QWK::QuickWindowAgent::qt_metacast(char const*)':
mocs_compilation_Release.cpp:(.text+0x335): undefined reference to `QWK::WindowAgentBase::qt_metacast(char const*)'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function `QtPrivate::MetaObjectForType<QWK::WindowAgentBase::SystemButton, void>::metaObjectFunction(QtPrivate::QMetaTypeInterface const*)':
mocs_compilation_Release.cpp:(.text._ZN9QtPrivate17MetaObjectForTypeIN3QWK15WindowAgentBase12SystemButtonEvE18metaObjectFunctionEPKNS_18QMetaTypeInterfaceE[_ZN9QtPrivate17MetaObjectForTypeIN3QWK15WindowAgentBase12SystemButtonEvE18metaObjectFunctionEPKNS_18QMetaTypeInterfaceE]+0x7): undefined reference to `QWK::WindowAgentBase::staticMetaObject'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function `QtPrivate::QDebugStreamOperatorForType<QWK::WindowAgentBase::SystemButton, true>::debugStream(QtPrivate::QMetaTypeInterface const*, QDebug&, void const*)':
mocs_compilation_Release.cpp:(.text._ZN9QtPrivate27QDebugStreamOperatorForTypeIN3QWK15WindowAgentBase12SystemButtonELb1EE11debugStreamEPKNS_18QMetaTypeInterfaceER6QDebugPKv[_ZN9QtPrivate27QDebugStreamOperatorForTypeIN3QWK15WindowAgentBase12SystemButtonELb1EE11debugStreamEPKNS_18QMetaTypeInterfaceER6QDebugPKv]+0x16): undefined reference to `QWK::WindowAgentBase::staticMetaObject'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o): in function `QtPrivate::QMetaTypeForType<QWK::WindowAgentBase::SystemButton>::getLegacyRegister()::{lambda()#1}::_FUN()':
mocs_compilation_Release.cpp:(.text._ZZN9QtPrivate16QMetaTypeForTypeIN3QWK15WindowAgentBase12SystemButtonEE17getLegacyRegisterEvENUlvE_4_FUNEv[_ZZN9QtPrivate16QMetaTypeForTypeIN3QWK15WindowAgentBase12SystemButtonEE17getLegacyRegisterEvENUlvE_4_FUNEv]+0x5b): undefined reference to `QWK::WindowAgentBase::staticMetaObject'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o):(.data.rel.ro+0xc0): undefined reference to `QWK::WindowAgentBase::staticMetaObject'
/usr/bin/ld: /media/data/devel/deps/qwindowkit/out_qt6.7.1/share/QWindowKit/qmake/../../../lib/libQWKQuick.a(mocs_compilation_Release.cpp.o):(.data.rel.ro._ZTIN3QWK16QuickWindowAgentE[_ZTIN3QWK16QuickWindowAgentE]+0x10): undefined reference to `typeinfo for QWK::WindowAgentBase'
collect2: error: ld returned 1 exit status

micpub avatar May 30 '24 08:05 micpub

ive switched my build system to cmake so i am no longer affected by this bug, but of course it is still present, so either mark your lib as qmake unsupported (only cmake) or fix in the future. thanks.

micpub avatar Jun 20 '24 12:06 micpub

yeah, this is what I think. Supporting both qmake and cmake is painful, and sadly both of us are lack of time. I always want to remove qmake support, but my partner want to keep it, let me persuade my partner.

wangwenx190 avatar Jun 21 '24 00:06 wangwenx190

Please check https://github.com/stdware/qwindowkit/issues/151

zhiyiYo avatar Nov 20 '24 09:11 zhiyiYo