Rick Duley <
rick...@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