Unit graph issue
lazarus / 39-Graphics
----------------------------------------------------------------------
p.barton@twgs.qld.edu.au · 2012-08-28 00:00
Hi,
Trying to get Lazarus to run the "graph" unit in Pascal - uses graph;
Works just fine when installed on my laptop but when installing onto
our school network get this message:
C:\Users\bartp\AppData\Local\Temp\project1.lpr(1,1) Fatal: Can't find
unit Graph used by UsingGraphics
I'm guessing it is something to do with the path of the graph unit.
Any suggestions?
Sample code I'm running to check if graphics will work below:
Program UsingGraphics;
Uses Crt,Graph;
Var GraphicsDriver, GraphicsMode:smallint;
procedure OpenGraphics;
Begin
Writeln('Graphics Initialised.');
GraphicsDriver := Detect;
InitGraph(GraphicsDriver, GraphicsMode,'');
end;
procedure CloseGraphics;
begin
CloseGraph;
Writeln('Graphics Closed.');
End;
procedure DrawCircle;
begin
circle(320,240,100);
end;
{MISSION CONTROL}
begin
OpenGraphics;
repeat
DrawCircle
until keypressed;
CloseGraphics;
readln;
end.
----------------------------------------------------------------------
Leledumbo · 2012-08-28 15:06
QuoteCan't find unit Graph used by UsingGraphicsNot related to the
code, but rather your configuration. Open your fpc.cfg, ensure -Fu
points to correct directories. If you use standard fpc installation,
actually one value is enough:
-Fu//units/$fpctarget/*