Recent

Author Topic: problem using ptcgraph - missing library  (Read 675 times)

ron77

  • New Member
  • *
  • Posts: 22
problem using ptcgraph - missing library
« on: September 04, 2021, 07:38:26 am »
hello...
i'm on linux 64 bit (ubuntu) when i'm trying to compile the following code I get an error about a missing lib

here is the code:
Code: Pascal  [Select][+][-]
  1. program Project1;
  2.  
  3. { Program to demonstrate static graphics mode selection }
  4.  
  5. uses ptcgraph;
  6.  
  7.  
  8. const
  9.   TheLine = 'We are now in 640 x 480 x 256 colors!'+
  10.             ' (press <Return> to continue)';
  11.  
  12. var
  13.   gd, gm, lo, hi, error,tw,th: Smallint;
  14.   found: boolean;
  15.  
  16. begin
  17.   { We want an 8 bit mode }
  18.   gd := D8bit;
  19.   gm := m640x480;
  20.   initgraph(gd,gm,'');
  21.   { Make sure you always check graphresult! }
  22.   error := graphResult;
  23.   if (error <> grOk) Then
  24.     begin
  25.     writeln('640x480x256 is not supported!');
  26.     halt(1)
  27.     end;
  28.   { We are now in 640x480x256 }
  29.   setColor(cyan);
  30.   rectangle(0,0,getmaxx,getmaxy);
  31.   { Write a nice message in the center of the screen }
  32.   setTextStyle(defaultFont,horizDir,1);
  33.   tw:=TextWidth(TheLine);
  34.   th:=TextHeight(TheLine);
  35.   outTextXY((getMaxX - TW) div 2,
  36.             (getMaxY - TH) div 2,TheLine);
  37.   { Wait for return }
  38.   readln;
  39.   { Back to text mode }
  40.   closegraph;
  41. end.
  42.  

here is the error massage:
Code: Pascal  [Select][+][-]
  1. linker: /usr/bin/ld: cannot find -lXxf86dga

what is this libxxf86dga library and what do I have to do in order to get it so I can use ptcgraph unit?

thank you...

ron77

  • New Member
  • *
  • Posts: 22
Re: problem using ptcgraph - missing library
« Reply #1 on: September 04, 2021, 08:04:56 am »
it seems i found the answer

Code: Pascal  [Select][+][-]
  1. $ sudo apt-get install libxxf86dga-dev
  2.  

now the code compiles and run with out error yet I can't see a window or console

 

TinyPortal © 2005-2018