Cmake Qt5 | undefined reference to `QPrinter::QPrinter(QPrinter::PrinterMode)
问题 I am preparing cmake build for qt application. where I am using following structure .. libMyApp which uses SET(QT5_MODULES Widgets PrintSupport Network XmlPatterns) FIND_PACKAGE(Qt5 REQUIRED COMPONENTS ${QT5_MODULES}) and TARGET_LINK_LIBRARIES( ${TARGET_NAME} Qt5::Widgets Qt5::PrintSupport Qt5::Network Qt5::XmlPatterns ) libMyApp build successfully and generated libMyApp.a (static library) Now I am using this library in my application MyApp which uses SET(QT5_MODULES Widgets PrintSupport