comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.sandberg@bredband.net>
Subject: Re: How can I loose the cmd window from my GtkAda app?
Date: Mon, 11 May 2009 18:41:08 +0200
Date: 2009-05-11T18:41:08+02:00	[thread overview]
Message-ID: <klZNl.11576$hd4.3404@newsfe24.ams2> (raw)
In-Reply-To: <aicc25rzguxw.1rko6vjgr46re.dlg@40tude.net>

Agree on that so thats why i suggested the gpr file solution, and that 
one could be expanded a bit more according to the following schema.

project proj is

    type OS_Type is ("Linux","Windows_NT");
    OS  : OS_Type := external ("OS","Linux");
    ...
    ...
    package Linker is
       case OS is
          when "Linux" =>
             for Default_Switches ("Ada") use
               ("-L/usr/local/lib/",
                "-lps2000");
          when "Windows_NT" =>
             for Default_Switches ("Ada") use
               ("-LC:\Program Files\Pico Technology\PicoScope6",
                "-lps2000",
                "-mwindows");
       end case;
    end Linker;
end proj;

/That how far i got in windows/Linux Interoperability
/Per


Dmitry A. Kazakov wrote:
> On Mon, 11 May 2009 17:30:12 +0200, Per Sandberg wrote:
> 
>> Thar are two more ways:
>> * Add the following line to the source code of the main program:
>>       "pragma Linker_Options("-mwindows");
> 
> Hmm, I don't like this, because it makes code platform-dependent.
> 
>> * If using gnat project files, Updated package linker add one of the 
>> folowing depending in taste:
>>    package Linker is
> 
> Yes, however I would prefer to have it enforced by gtkada.gpr, rather than
> contaminating the application's gpr which with-es gtkada.gpr. Unfortunately
> I know no way to do this in a library project.
> 



  reply	other threads:[~2009-05-11 16:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 15:19 How can I loose the cmd window from my GtkAda app? daniel.wengelin
2009-05-11 15:53 ` Dmitry A. Kazakov
2009-05-11 15:30   ` Per Sandberg
2009-05-11 16:40     ` Dmitry A. Kazakov
2009-05-11 16:41       ` Per Sandberg [this message]
2009-05-11 21:36       ` sjw
2009-05-12  7:15         ` Dmitry A. Kazakov
2009-05-12  8:13       ` Jean-Pierre Rosen
2009-05-12  9:24         ` Dmitry A. Kazakov
2009-09-10 20:24           ` Jack Mitchell
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox