[Lazarus] use of graphics unit on command line

Xiangrong Fang xrfang at gmail.com
Wed Apr 23 11:06:29 CEST 2014


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-ide.org/pipermail/lazarus/attachments/20140423/85cff4d4/attachment-0002.html>


More information about the Lazarus mailing list