1

/usr/lib/libpoppler.so.50:未定义对std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' Makefile:156: recipe for target 'DocViewer' failed /usr/lib/libsystemd.so.0: undefined reference tolzma_stream_decoder@XZ_5.0' 的引用 /usr/lib/libQt5Core.so:未定义对__cxa_throw_bad_array_new_length@CXXABI_1.3.8' /usr/lib/libsystemd.so.0: undefined reference tolzma_end@XZ_5.0' 的引用 /usr/lib/libsystemd.so.0:未定义参考 `lzma_code@XZ_5.0' collect2: error: ld returned 1 exit status make: *** [DocViewer] Error 1 20:53:35: The process "/usr/bin/make" exited with code 2.

poppler使用in编译程序时出现上述错误Qt5

下面是我的项目文件,应该改变什么吗?

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = DocViewer
TEMPLATE = app

INCLUDEPATH  += /usr/include/poppler/qt5
LIBS         += -L/usr/lib -lpoppler-qt5

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui
4

1 回答 1

0

对于 libicu 中的“__cxa_throw_bad_array_new_length@CXXABI_1.3.8”错误,看起来问题是不兼容的 icu 构建(softfp 与 hardfp)。

我遇到了同样的错误,我通过下载重建的 ICU 解决了这个错误(以避免自己重建它)。

  • 从http://thebugfreeblog.blogspot.fr/2016/12/binaries-for-pot-550-beta1-on-qt-580.html下载“POT”二进制文件 。
  • lrzuntar 文件
  • tar xf qtdeps.tar
  • 在设备上,移开 libicu*(在我使用 raspbian 的情况下,它位于 usr/lib/arm-linux-gnueabihf 中),然后从 qtdeps 那里转移 libicu*
  • 在设备上,移开“unicode”包含目录(对于 raspbian,它位于 /usr/include/arm-linux-gnueabihf/unicode 中),然后从 qtdeps 那里复制 unicode 包含目录。
  • 使用 rsync 从设备重新同步到您的 sysroot
  • 重新配置和重建 qtbase(在删除 qtbase/src/corelib 下名称中包含“icu”的 .o 文件之后 - 或从头开始重建 Qt)
于 2017-04-05T21:36:45.740 回答