Lazarus

Free Pascal => General => Topic started by: Soner on May 18, 2019, 04:17:24 pm

Title: When I run the programm, it shows "Control-C hit" exception.
Post by: Soner on May 18, 2019, 04:17:24 pm
Today I ported A. Hausladens PdfiumLib (https://github.com/ahausladen/PdfiumLib) with help of taaz-version (https://forum.lazarus.freepascal.org/index.php?topic=40938.0).
Bblanchon's (https://github.com/bblanchon/pdfium-binaries/releases) binaries are crossplatform builds of pfdium. But when I use the Bblanchon's-dlls the applications shows "Control-C hit" exception.
It runs with dlls from PdfiumViewer (https://github.com/pvginkel/PdfiumViewer/tree/releases/2.12.0.0/Libraries/Pdfium) without error, but dlls from there is not crossplatform.

I think bblanchon's (https://github.com/bblanchon/pdfium-binaries/releases) binaries are c++ dlls and fpc can't handle c++ dlls because bblanchon's worked with delphi without errors.

My question is Am I right, doesn't support fpc c++ libraries?

I attach my version and here is taaz-version. (https://forum.lazarus.freepascal.org/index.php?topic=40938.0)

Title: Re: When I run the programm, it shows "Control-C hit" exception.
Post by: lucamar on May 18, 2019, 04:25:46 pm
DLLs have well defined interface requirements no matter in which language they are written.

I don't know what your problem may be but it can't (shouldn't) be that the DLLs were implemented in C++

You may have problems if, for example, a call returned a pointer to a C++ object or something similar, but "normal" calls should work as in any other DLL.
Title: Re: When I run the programm, it shows "Control-C hit" exception.
Post by: Soner on May 18, 2019, 04:30:05 pm
DLLs have well defined interface requirements no matter in which language they are written.

I don't know what your problem may be but it can't (shouldn't) be that the DLLs were implemented in C++

You may have problems if, for example, a call returned a pointer to a C++ object or something similar, but "normal" calls should work as in any other DLL.
And why we need for QT-dlls a c-dll libqt4pas.dll?
Title: Re: When I run the programm, it shows "Control-C hit" exception.
Post by: PascalDragon on May 20, 2019, 04:13:09 pm
And why we need for QT-dlls a c-dll libqt4pas.dll?
Because Qt works with C++ classes and these need to be flattened to a C interface so that FPC can handle it.

However no one stops anyone from writing a library in C++ that already provides such a flat C like interface itself.
TinyPortal © 2005-2018