On 13.04.2013 18:48, Daniel Simoes de Ameida wrote:
I´m confusing... I always find out that the "CONSOLE" directive exists
only for applications that does not require a GUI.... or in other words,
applications that does not require a X server

How can I distinguish applications in Text mode (CONSOLE) from Graphics
Applications (GUI) ?

You can't as leledumbo wrote already. The compiler will even warn if you use "$apptype ..." in the main program file on Unix systems, because it is simply not supported there.

As a sidenote: checking for "ifdef console" or "ifdef gui" is problematic, because you will only be aware of a change if your units are completely recompiled. If you change the setting (e.g. by not using the IDE dialogs, but by manually adding "apptype console" to your program file) the compiler will only recompile the main program unit and your units won't detect a change.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to