Project file
Link the NCReport library and add its include directory. Adjust the paths to where you installed NCReport. Since version 2.27 the debug build of the library is named NCReportd (previously NCReportDebug), and Zint is a separate shared library (zint / zintd).
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
TARGET = MySimpleDemo
TEMPLATE = app
SOURCES += main.cpp
win32:CONFIG(release, debug|release) : LIBS += -L$$PWD/../ncreport/lib/ -lNCReport2
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../ncreport/lib/ -lNCReportDebug2
INCLUDEPATH += $$PWD/../ncreport/includescmake_minimum_required(VERSION 3.16)
project(MySimpleDemo LANGUAGES CXX)
find_package(Qt6 REQUIRED COMPONENTS Widgets PrintSupport)
add_executable(MySimpleDemo main.cpp)
# Adjust to your NCReport installation
set(NCREPORT_DIR "${CMAKE_SOURCE_DIR}/../ncreport")
target_include_directories(MySimpleDemo PRIVATE "${NCREPORT_DIR}/includes")
target_link_directories(MySimpleDemo PRIVATE "${NCREPORT_DIR}/lib")
target_link_libraries(MySimpleDemo PRIVATE Qt6::Widgets Qt6::PrintSupport NCReport2)