[Lazarus] Linux GUI Application define CONSOLE
Daniel Simoes de Ameida
dopidaniel at yahoo.com.br
Sun Apr 14 15:37:10 CEST 2013
Sorry for previous message...
I really hate Yahoo Mail, I cant find a way to avoid top posting...
I found a way to share code between GUI and CONSOLE applications... On CONSOLE applications, I do not use Packages dependencies, instead I add all directories from required Packages on "Other Unit Files", but I also inform a "Unit Output directory", so all files are always recompiled, as CONSOLE mode, and .PPU saved on a different location...
[]s Daniel
Conheça o Projeto ACBr - Automaçao Comercial Brasil
DJSystem a Loja Patrocinadora do ACBr
>________________________________
> De: Sven Barth <pascaldragon at googlemail.com>
>Para: lazarus at lists.lazarus.freepascal.org
>Enviadas: Sábado, 13 de Abril de 2013 18:49
>Assunto: Re: [Lazarus] Linux GUI Application define CONSOLE
>
>
>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 at lists.lazarus.freepascal.org
>http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130414/e84310e7/attachment-0003.html>
More information about the Lazarus
mailing list