免费且简单的 Qt 5.1.0 或 Qt 4.8.5 报告引擎 [英] Free and easy Qt 5.1.0 or Qt 4.8.5 reporting engine

查看:48
本文介绍了免费且简单的 Qt 5.1.0 或 Qt 4.8.5 报告引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难使用 NCReport 库打印报告

i got hard to print report using NCReport library

所以还有另一种用于打印的 esay 解决方案

so there an other esay solution for printing

当我想使用 qt 4.8.5 和 ncreport 引擎编译我的程序时总是出错

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

她是错误

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

推荐答案

您需要在 qmake 中使用以下内容:

You need to use the following with qmake:

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

其中 libNCReport2.a 将是 ncreport 库的名称,即您不需要使用lib"前缀,也不需要使用.a"扩展名.

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.

如果这对未定义的符号仍然没有帮助,您需要深入研究静态库是否存在您尝试在应用程序中使用的符号,即您的应用程序是否与他们为您提供的 NociSoft 软件.

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.

您可以使用 mingw 检查符号,因为它默认安装了nm"二进制文件.如果符号不存在,您将需要从 NociSoft 获取兼容版本,或者您需要在您的应用程序中使用您拥有的库.

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.

这篇关于免费且简单的 Qt 5.1.0 或 Qt 4.8.5 报告引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆