Recent

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

Soner

  • Sr. Member
  • ****
  • Posts: 305
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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Soner

  • Sr. Member
  • ****
  • Posts: 305
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: 5444
  • 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.

 

TinyPortal © 2005-2018