manisandro / gImageReader

A Gtk/Qt front-end to tesseract-ocr.
GNU General Public License v3.0
1.63k stars 190 forks source link

gImageReader does not compile with 5.15.2 #500

Closed HJarausch closed 3 years ago

HJarausch commented 3 years ago

With QT 5.15.2 I get

/var/tmp/portage/media-gfx/gimagereader-3.3.1/work/gimagereader-3.3.1/qt/src/hocr/HOCROdtExporter.cc: In member function 'bool HOCROdtExporter::run(const HOCRDocument*, QString&)': /var/tmp/portage/media-gfx/gimagereader-3.3.1/work/gimagereader-3.3.1/qt/src/hocr/HOCROdtExporter.cc:261:35: error: incomplete type 'QUrl' used in nested name specifier 261 | QDesktopServices::openUrl(QUrl::fromLocalFile(outname));

Is there any fix? Thanks, Helmut

pointer commented 3 years ago

Hi, include QURL like this #include <QUrl> and modify like this:


        // QDesktopServices::openUrl(QUrl::fromLocalFile(outname));
        QUrl url = QUrl::fromLocalFile(outname);
        QDesktopServices::openUrl(url)
```;
HJarausch commented 3 years ago

Many thanks pointer. Now, all files compile but I get a lot of linkage errors which I don't understand:

Acquirer.cc:(.text+0x3): undefined reference to `vtable for Acquirer'
Config.cc:(.text+0x1d81): undefined reference to `vtable for Config'

and many more. Do you have an idea what's going wrong?

manisandro commented 3 years ago

You'll also want https://github.com/manisandro/gImageReader/commit/197cf34eacb04fdb91845a50fe82326a16ccc9d2 and https://github.com/manisandro/gImageReader/commit/e023778d9cd25d2d4065d51dbccc039d9aff44d1

HJarausch commented 3 years ago

Many thanks Sandro, it builds fine now on my Gentoo machine. Helmut