Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linkage error with QWINDOWKIT_BUILD_STATIC=ON #77

Open
micpub opened this issue May 9, 2024 · 2 comments
Open

linkage error with QWINDOWKIT_BUILD_STATIC=ON #77

micpub opened this issue May 9, 2024 · 2 comments

Comments

@micpub
Copy link

micpub commented May 9, 2024

/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
Copy link
Author

micpub commented May 13, 2024

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)

@SineStriker
Copy link
Contributor

I'll watch this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants