<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">Hi All,</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
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.</div><div class="gmail_default" style="font-family:courier new,monospace">
<br></div><div class="gmail_default" style="font-family:courier new,monospace">That is, suppose my class looks like this:</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
TMyClass</div><div class="gmail_default" style="font-family:courier new,monospace">public</div><div class="gmail_default" style="font-family:courier new,monospace"> procedure Generate; //does NOT use graphics</div><div class="gmail_default" style="font-family:courier new,monospace">
procedure Paint; //uses graphics</div><div class="gmail_default" style="font-family:courier new,monospace">end;</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
now I want to test the Generate method. I write a new program like this:</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
program test;</div><div class="gmail_default" style="font-family:courier new,monospace">{$mode objfpc}{$H+}</div><div class="gmail_default" style="font-family:courier new,monospace">uses myclass;</div><div class="gmail_default" style="font-family:courier new,monospace">
begin</div><div class="gmail_default" style="font-family:courier new,monospace">end.</div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">
The compiler complains that Graphics unit cannot be found. </div><div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">How can I do such test with just vi and fpc on command line?</div>
<div class="gmail_default" style="font-family:courier new,monospace"><br></div><div class="gmail_default" style="font-family:courier new,monospace">Thanks!</div><div class="gmail_default" style="font-family:courier new,monospace">
<br></div><div class="gmail_default" style="font-family:courier new,monospace">Xiangrong</div></div>