* ... !! GPS
@ 2021-01-29 16:15 Mehdi Saada
2021-01-29 16:40 ` Dmitry A. Kazakov
2021-01-29 18:39 ` Simon Wright
0 siblings, 2 replies; 3+ messages in thread
From: Mehdi Saada @ 2021-01-29 16:15 UTC (permalink / raw)
I wish gps weird unintuitive behavior would not add a source of irritation to my already existing difficulties.
This:
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is begin
Put_Line("essai factoriels: de 1 à 5");
end Main;
results in:
/bin/sh -c /home/mehdi/obj/main
[2021-01-29 17:08:00] process terminated successfully, elapsed time: 00.25s
What the Ѐßß is that ? it ran on other exercises, then would not, so with a minimal program... it fails too.
project Default is
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("main.adb");
end Default;
it always uses "src" which includes the files from other projects/exos. So they appear on the project... !
Thanks for putting up with this...
Is there a simple compiler which still corrects for semantics ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ... !! GPS
2021-01-29 16:15 ... !! GPS Mehdi Saada
@ 2021-01-29 16:40 ` Dmitry A. Kazakov
2021-01-29 18:39 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry A. Kazakov @ 2021-01-29 16:40 UTC (permalink / raw)
On 2021-01-29 17:15, Mehdi Saada wrote:
> What the Ѐßß is that ? it ran on other exercises, then would not, so with a minimal program... it fails too.
>
> project Default is
> for Source_Dirs use ("src");
for Source_Files use ("main.adb"); -- Why do I stuff everything
-- in one directory?
for Exec_Dir use "obj"; -- Remind me, why do I want executable
-- in the objects directory?
> for Object_Dir use "obj";
> for Main use ("main.adb");
> end Default;
>
> it always uses "src" which includes the files from other projects/exos. So they appear on the project... !
>
> Thanks for putting up with this...
> Is there a simple compiler which still corrects for semantics ?
P.S. When nothing else helps, as the last resort, of course, consider
reading the manual. (:-))
https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/gnat_project_manager.html
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ... !! GPS
2021-01-29 16:15 ... !! GPS Mehdi Saada
2021-01-29 16:40 ` Dmitry A. Kazakov
@ 2021-01-29 18:39 ` Simon Wright
1 sibling, 0 replies; 3+ messages in thread
From: Simon Wright @ 2021-01-29 18:39 UTC (permalink / raw)
Mehdi Saada <00120260a@gmail.com> writes:
> I wish gps weird unintuitive behavior would not add a source of
> irritation to my already existing difficulties.
> This:
> with Ada.Text_IO; use Ada.Text_IO;
> procedure Main is begin
> Put_Line("essai factoriels: de 1 à 5");
> end Main;
>
> results in:
> /bin/sh -c /home/mehdi/obj/main
> [2021-01-29 17:08:00] process terminated successfully, elapsed time: 00.25s
Did you choose "run in an external terminal"? Try not checking that box
> project Default is
> for Source_Dirs use ("src");
> for Object_Dir use "obj";
> for Main use ("main.adb");
> end Default;
>
> it always uses "src" which includes the files from other
> projects/exos. So they appear on the project... !
I suggest you use a different top level directory for each project:
~/project1/...
~/project2/...
Also, I find
for Exec_Dir use ".";
helpful
> Is there a simple compiler which still corrects for semantics ?
DWIM considered dangerous! Wikipedia:
"DWIM (do what I mean) computer systems attempt to anticipate what
users intend to do, correcting trivial errors automatically rather
than blindly executing users' explicit but potentially incorrect
input."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-29 18:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 16:15 ... !! GPS Mehdi Saada
2021-01-29 16:40 ` Dmitry A. Kazakov
2021-01-29 18:39 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox