From: Jere <jhb.chat@gmail.com>
Subject: Re: Linker_Alias
Date: Sat, 6 Jan 2018 06:46:58 -0800 (PST)
Date: 2018-01-06T06:46:58-08:00 [thread overview]
Message-ID: <726b2d23-1089-4a0d-a8f6-2b05c6939abe@googlegroups.com> (raw)
In-Reply-To: <lyk1wxcjy6.fsf@pushface.org>
On Thursday, January 4, 2018 at 5:56:04 PM UTC-5, Simon Wright wrote:
> Jere writes:
>
> > So it looks like it still isn't defaulting the procedure.
>
> All I can say is, works for me (macOS, GCC 7.1.0, GNAT GPL 2017).
>
> Have you done a clean rebuild?
I did try a clean and rebuild. I even started a fresh project.
Here are my files:
default.gpr
***************************************
project Default is
for Source_Dirs use ("src/**");
for Object_Dir use "obj";
for Exec_Dir use "bin";
for Main use ("main.adb");
for Languages use ("Ada");
package Ide is
for Documentation_Dir use "doc";
end Ide;
package Pretty_Printer is
for Default_Switches ("ada") use ("-cl3");
end Pretty_Printer;
package Compiler is
for Default_Switches ("ada") use ("-gnatn", "-gnato", "-gnatE", "-fstack-check", "-gnat12");
end Compiler;
end Default;
***************************************
src/main.adb
***************************************
with Ada.Text_IO; use Ada.Text_IO;
with Operations;
procedure Main is
begin
Put_Line("Hello");
Operations.Target_Op;
end Main;
***************************************
src/operations.ads
***************************************
package Operations is
procedure Target_Op
with
Convention => Ada,
Export,
External_Name => "target_op",
Link_Name => "target_op";
pragma Weak_External(Target_Op);
end Operations;
***************************************
src/operations.adb
***************************************
with Ada.Text_IO; use Ada.Text_IO;
package body Operations is
procedure Target_Op is
begin
Put_Line("Calling Target Op Default");
end Target_Op;
end Operations;
***************************************
I tried to mimic your example and made sure Operations was
with'ed and called in the main subprogram. I would have
included a zip file, but don't see that option in Google
Groups.
Does mine run exception free for you on Mac (If you don't mind
checking of course)?
next prev parent reply other threads:[~2018-01-06 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 18:39 Linker_Alias Jere
2018-01-03 21:59 ` Linker_Alias Simon Wright
2018-01-04 21:09 ` Linker_Alias jhb.games
2018-01-04 22:56 ` Linker_Alias Simon Wright
2018-01-06 14:46 ` Jere [this message]
2018-01-06 16:58 ` Linker_Alias Simon Wright
2018-01-06 20:16 ` Linker_Alias Jere
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox