svgalib use on debian 11 i386 lazarus / 39-Graphics ---------------------------------------------------------------------- tan9p · 2022-03-31 15:56 I copy the following program to draw the Mandelbrot set. The Source: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Mandelbrot; {$ASSERTIONS+} uses crt,graph; type        complex=record                re:real;                im:real;        end; operator *(a:complex;b:complex)c:complex;begin        c.re := a.re*b.re - a.im*b.im;        c.im := a.im*b.re + a.re*b.im;end;operator +(a:complex;b:complex)c:complex;begin        c.re := a.re + b.re;      c.im := a.im + b.im;end; var        z,c:complex;        gd,gm,i,j,k:integer;begin        gd := Detect;        gm := m1024x768;        InitGraph(gd,gm,'');        Assert(graphResult=grOk);        c.re := -0.75;        c.im := 0;      for i:=-300 to 300 do                for j:=-200 to 200 do              begin                        z.re := i/200;                      z.im := j/200;                        for k:=0 to 200 do                      begin                                if (sqrt(z.re*z.re+z.im*z.im)>2) then                                      break                                else                                       z := (z*z) + c;                        end;                      PutPixel(i+300,j+200,k);                end;        readln;        CloseGraph;end. and I installed the svgalib on my debian 11. But It only displayed Using VGA mode,svgalib 1.4.3,no drawing. How can I handle it ? thanks ---------------------------------------------------------------------- MarkMLl · 2022-03-31 17:16 Are you able to run any svgalib test programs with full resolution? MarkMLl ---------------------------------------------------------------------- tan9p · 2022-04-01 01:10 No. all of them displayed the same screen. Using VGA mode,svgalib 1.4.3 both the pascal and C test program. ---------------------------------------------------------------------- MarkMLl · 2022-04-01 06:36 Quote from: tan9p on April 01, 2022, 03:10:35 amNo. all of them displayed the same screen. Using VGA mode,svgalib 1.4.3 both the pascal and C test program. In that case if test programs supplied as part of svgalib don't work properly it's an operating system issue. I didn't realise anybody still used svgalib any more except possibly for embedded stuff. It was fairly common when I started uing Linux in about '94... MarkMLl ---------------------------------------------------------------------- tan9p · 2022-04-01 09:33 Thanks. I found the following information in https://www.freepascal.org/faq.var 5.6 Quote链接器为什么找不到 "vga"? 这个错误通常是这样的:                  Free Pascal Compiler version 3.0.x [xxxx/yy/zz] for i386                  Copyright (c) 1993-2008 by Florian Klaempfl                  Target OS: Linux for i386                  Compiling test.pp                  Assembling test                  Linking test                  /usr/bin/ld: cannot find -lvga                  test.pp(6,4) Warning: Error while linking Closing script ppas.sh 5 Lines                  compiled, 0.2 sec             此错误不是 FPC 或 FPC 本身的安装错误,是在 UNIX 安装中缺少 Svgalib 库。请使用你喜欢的包管理器工具安装所需的库 Is it out of date? On Windows,the above Source works well, and How Can I get the same result on linux? ---------------------------------------------------------------------- MarkMLl · 2022-04-01 09:37 Code: [Select]/usr/bin/ld: cannot find -lvga Fix that. However the FIRST thing to do is determine whether the current combination of svgalib and Linux can display the resolution you want. Somewhat later: https://tracker.debian.org/pkg/svgalib shows that svgalib was removed from Debian in 2013 at which point it corresponded to https://launchpad.net/debian/+source/svgalib/1:1.9.25-3 which is presumably one of the development versions from http://my.svgalib.org/svgalib/ The only possible reason you might have for trying to use this is if you're working on a standalone system which doesn't have one of the standard GUIs (i.e. desktop etc.). Even then, I'd be surprised if it was an easy job unless you could get hold of the same hardware that people were using for it in 2013: and even then it might turn out to be challenging even for an experienced user. You might do better starting off with something like https://sourceforge.net/projects/doublefractal/ or alternatively this forum's advanced search facility with the results ordered by date... there's been fairly recent discussion of Mandelbrot generation. MarkMLl