From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.170.198 with SMTP id g67mr4295539ioj.101.1515250019553; Sat, 06 Jan 2018 06:46:59 -0800 (PST) X-Received: by 10.157.11.129 with SMTP id 1mr285131oth.8.1515250018871; Sat, 06 Jan 2018 06:46:58 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!i6no817565itb.0!news-out.google.com!b73ni2538ita.0!nntp.google.com!i6no817563itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 6 Jan 2018 06:46:58 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.208.22; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.208.22 References: <6042baa6-7743-48aa-8237-87181ab41a02@googlegroups.com> <7c41ec78-ba73-4f85-a7a7-837c3d582fa0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <726b2d23-1089-4a0d-a8f6-2b05c6939abe@googlegroups.com> Subject: Re: Linker_Alias From: Jere Injection-Date: Sat, 06 Jan 2018 14:46:59 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 3300 X-Received-Body-CRC: 2196993387 Xref: reader02.eternal-september.org comp.lang.ada:49788 Date: 2018-01-06T06:46:58-08:00 List-Id: 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)?