comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Working folders for a project
Date: Wed, 28 Sep 2022 13:35:08 -0700	[thread overview]
Message-ID: <86ill7i6f7.fsf@stephe-leake.org> (raw)
In-Reply-To: bb5f5857-a402-4cd5-9a11-3edeaef585c4n@googlegroups.com

Rick Duley <rickduley@gmail.com> writes:

> It is my practice to load my software in the folder 'C:\' on my PC but
> to do my work in a separate disc partition 'D:\'.
>
> I have created a new Project deploying it in D:\Ada Programming. I
> specified the Project Name and Main Name as My_SDC. My_SDC reads
>
> project My_Sdc is
>     for Source_Dirs use ("Source Files");
>     for Object_Dir use "Object Files";

Note that this is different from the default "obj" for Object_Dir.

How did you edit this gpr file? if you did not use the GNAT Studio
Preferences editor, GNAT Studio does not know about this change from the
default. 

> 
>     for Main use ("my_sdc.adb"); end My_Sdc;
>
> Project --> Build All is successful and placed the relevant files
> where I expect them to be.

I'm assuming you meaning the .exe is "D:\Ada Programming\Object
Files\my_sdc.exe", since that's what the gpr file says.

> Project --> Build and Run --> My_SDC.adb results in this error message:
>
> [2022-09-27 10:45:00] Error while trying to execute D:\Ada
> Programming\obj\my_sdc.exe: not an executable

This indicates GNAT Studio is not using the gpr file you want it to.

You can discover what GNAT Studio thinks the project file is by hovering
the mouse over the root folder in the Project window; for the Hello
World project I created, this shows
"/Projects/hello_world/hello_world.gpr" (I'm on Debian, hence the Unix
directory separators).

> Something is looking for a folder called D:\Ada Programming\obj which
> does not exist. How do I get it to look in the right place?

You need to specify your gpr file as the project file to open.

If you've edited the project file after you opened the project, you need
to tell GNAT Studio to read it again. I don't know how to do that short
of close the project and open it again.

-- 
-- Stephe

  parent reply	other threads:[~2022-09-28 20:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  2:50 Working folders for a project Rick Duley
2022-09-27  3:24 ` Nasser M. Abbasi
2022-09-27  6:14 ` Emmanuel Briot
2022-09-27  6:27 ` Dmitry A. Kazakov
2022-09-27  7:43   ` Rick Duley
2022-09-27  8:30     ` Dmitry A. Kazakov
2022-09-27  7:59   ` G.B.
2022-09-27 14:16   ` Simon Wright
2022-09-28 20:35 ` Stephen Leake [this message]
2022-09-28 21:22   ` Björn Lundin
2022-09-29  8:13   ` Simon Wright
2022-09-29  8:57     ` Simon Wright
replies disabled

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