Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

use of graphics unit on command line

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Xiangrong Fang

Hi All,

I have a class which uses Graphics unit. Now I would like to do some test of this class on command line, which does NOT require graphics support.

That is, suppose my class looks like this:

TMyClass
public
  procedure Generate;  //does NOT use graphics
  procedure Paint;     //uses graphics
end;

now I want to test the Generate method. I write a new program like this:

program test;
{$mode objfpc}{$H+}
uses myclass;
begin
end.

The compiler complains that Graphics unit cannot be found.

How can I do such test with just vi and fpc on command line?

Thanks!

Xiangrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140423/85cff4d4/attachment.html>

Reply by email