Recent

Author Topic: Problem with Interfaces Unit  (Read 2536 times)

cpalx

  • Hero Member
  • *****
  • Posts: 753
Problem with Interfaces Unit
« on: September 25, 2018, 10:29:09 pm »
Hi, use this units to create a PDF with. ¿Why it needs interfaces?
Code: Pascal  [Select][+][-]
  1.   PdfDoc,
  2.   PdfTypes,
  3.   FPReadGif,
  4.   PdfImages,
  5.   FPimage,
  6.   FPWriteJPEG,
  7.   PdfJpegImage,
  8.   PRJpegImage,
  9.   PdfFonts,
  10.   pack_powerpdf,

i need to use it in a cgi, but interfaces need GUI

Lazarus (1.84, FPC 3.04 ) both Windows (7, 19) and Linux (Ubuntu 18.04)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem with Interfaces Unit
« Reply #1 on: September 25, 2018, 10:48:14 pm »
My guess, and it's just that: a guess, is that some/any of those units depends on some widgetset-related unit for something, or contain a class descended from a widgetset class, like TControl, TCanvas, etc

interfaces seems to do nothing more than initialize/finalize the widgetset; if it's indeed needed it's more a symptom than the problem per se.
« Last Edit: September 25, 2018, 10:52:20 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.

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: Problem with Interfaces Unit
« Reply #2 on: September 27, 2018, 04:35:43 pm »
the problem is

PRJpegImage

:(

it use

Graphics, Controls, Forms, Dialogs,

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem with Interfaces Unit
« Reply #3 on: September 27, 2018, 05:23:27 pm »
You can check if it really uses them or if they are a left-over--or were automagically added--and if so, comment them out. Although I suspect that if they are there, there must be a reason why. Bad luck.
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.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: Problem with Interfaces Unit
« Reply #4 on: September 27, 2018, 05:27:03 pm »
You are mixing up interfaces as in language feature with interfaces as in co-operations.
This is not unusual, but they mean different things.
The English language is not expressive enough to solve this easily.

In this case it simply means you need it to talk to the OS and the widget set. Nothing to do with interface.
« Last Edit: September 27, 2018, 05:31:33 pm by Thaddy »
Specialize a type, not a var.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Problem with Interfaces Unit
« Reply #5 on: September 28, 2018, 02:09:22 pm »
He is talking about the Lazarus unit Interfaces.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Problem with Interfaces Unit
« Reply #6 on: September 28, 2018, 03:30:36 pm »
the problem is
PRJpegImage
Where is PRJpegImage? It is not in Lazarus sources.
There are other choices for JPEG images. Maybe you should switch to another unit.
« Last Edit: September 28, 2018, 03:39:05 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: Problem with Interfaces Unit
« Reply #7 on: September 28, 2018, 04:23:57 pm »
He is talking about the Lazarus unit Interfaces.
Which is what I tried to explain.
Specialize a type, not a var.

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: Problem with Interfaces Unit
« Reply #8 on: September 29, 2018, 05:35:54 am »
Yes, there are others. Thanks, i solved the problem

 

TinyPortal © 2005-2018