免费且简单的 Qt 5.1.0 或 Qt 4.8.5 报告引擎

编程入门 行业动态 更新时间:2024-10-25 15:28:49
本文介绍了免费且简单的 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 报告引擎

本文发布于:2023-10-10 22:31:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479937.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:简单   引擎   报告   Qt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!