Link to QT statically
-
Hi @Khalid80
Project A should link Project B library statically.
In Project B
projectB.pro file add CONFIG += staticlibIn project A
projectA.pro file add LIBS += -L$$PWD/-lprojectA -
Hi
Please be aware that using Qt as static library requires you to
1: release the source code as open source
Or
own a Qt license.Also to use static on all platforms, you will need to build Qt as static lib on all platforms.
I used this for Qt5.7 and mingw
https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW -
@Khalid80 so far I built QT statically using https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW tutorial, and then I created a static lib (Core.a) which is linking statically to QT, after that I created a test app the link to core.a but getting Core.cpp:-1: error: undefined reference to `QArrayData::shared_null'.
-