Free and easy Qt 5.1.0 or Qt 4.8.5 reporting engine [closed]

你。 提交于 2019-12-25 05:38:13

问题


i got hard to print report using NCReport library

so there an other esay solution for printing

i always got errors when i want to compiler my programme using qt 4.8.5 and ncreport engine

her is the error

C:\test\build-Ncreport-Qt_4_8_5_MinGW_32_bit-Debug\debug\mainwindow.o:-1: In function `MainWindow':

C:\test\Ncreport\mainwindow.cpp:12: erreur : undefined reference to `_imp___ZN8NCReportC1EP7QObject'

C:\test\Ncreport\mainwindow.cpp:13: erreur : undefined reference to `_imp___ZN8NCReport5resetEb'

C:\test\Ncreport\mainwindow.cpp:14: erreur : undefined reference to `_imp___ZN8NCReport13setReportFileERK7QString'

C:\test\Ncreport\mainwindow.cpp:15: erreur : undefined reference to `_imp___ZN8NCReport18runReportToPrinterEibP7QWidgetRK7QString'

C:\test\Ncreport\mainwindow.cpp:12: erreur : undefined reference to `_imp___ZN8NCReportC1EP7QObject'

C:\test\Ncreport\mainwindow.cpp:13: erreur : undefined reference to `_imp___ZN8NCReport5resetEb'

C:\test\Ncreport\mainwindow.cpp:14: erreur : undefined reference to `_imp___ZN8NCReport13setReportFileERK7QString'

C:\test\Ncreport\mainwindow.cpp:14: erreur : undefined reference to `_imp___ZN8NCReport13setReportFileERK7QString'

C:\test\Ncreport\mainwindow.cpp:15: erreur : undefined reference to `_imp___ZN8NCReport18runReportToPrinterEibP7QWidgetRK7QString'

:-1: erreur : collect2: ld returned 1 exit status

回答1:


You need to use the following with qmake:

LIBS += -L C:/test/Ncreport/lib -lNCReport2

where libNCReport2.a will be the name of the ncreport library, i.e. you do not need to use the "lib" prefix, nor the ".a" extension.

If that still does not help with the undefined symbols, you need to go down the way to actually look into the static library whether the symbols are present that you are trying to use in your application, i.e. whether your application is compatible with the NociSoft software they provided for you.

You can check the symbols with mingw since it has the 'nm' binary installed by default. If the symbols are not present, you will either need to grab the compatible version from NociSoft, or you need to comply in your application with the library you have.




回答2:


QtRPT and QtRptDesigner

QtRPT is the easy-to-use print report engine written in C++ QtToolkit. It allows combining several reports in one XML file. For separately taken field, you can specify some condition depending on which this field will display in different font and background color, etc. The project consists of two parts: report library QtRPT and report designer application QtRptDesigner. Report file is a file in XML format. The report designer makes easy to create report XML file. Thanks to Qt library, our project can be used in programs for work in the operating systems Windows, Linux, MacOS

http://qtrpt.sourceforge.net/



来源:https://stackoverflow.com/questions/18766034/free-and-easy-qt-5-1-0-or-qt-4-8-5-reporting-engine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!