From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!aioe.org!gy7opw3oYmwPg+L8gXeD2w.user.46.165.242.75.POSTED!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Working folders for a project Date: Wed, 28 Sep 2022 13:35:08 -0700 Organization: Aioe.org NNTP Server Message-ID: <86ill7i6f7.fsf@stephe-leake.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: gioia.aioe.org; logging-data="7377"; posting-host="gy7opw3oYmwPg+L8gXeD2w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) Cancel-Lock: sha1:/yo+pLS8T8YcB8tA+ajMacEZMXA= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:64454 List-Id: Rick Duley 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