Recent

Author Topic: When I run the programm, it shows "Control-C hit" exception.  (Read 318 times)

Soner

  • Full Member
  • ***
  • Posts: 150
Today I ported A. Hausladens PdfiumLib with help of taaz-version.
Bblanchon's 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 without error, but dlls from there is not crossplatform.

I think bblanchon's 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.


lucamar

  • Hero Member
  • *****
  • Posts: 1966
Re: When I run the programm, it shows "Control-C hit" exception.
« Reply #1 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.
« Last Edit: May 18, 2019, 04:27:48 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

Soner

  • Full Member
  • ***
  • Posts: 150
Re: When I run the programm, it shows "Control-C hit" exception.
« Reply #2 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?

PascalDragon

  • Hero Member
  • *****
  • Posts: 526
  • Compiler Developer
Re: When I run the programm, it shows "Control-C hit" exception.
« Reply #3 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.