From: Mark Lorenzen <mark.lorenzen@gmail.com>
Subject: Re: How to supply O/S linker arguments with gprbuild?
Date: Mon, 22 Jun 2020 09:14:43 -0700 (PDT) [thread overview]
Message-ID: <587e491e-b22f-4145-82d7-8e33bd77c52do@googlegroups.com> (raw)
In-Reply-To: <3f234cce-c49f-40a4-83a4-f0c9860d8abfo@googlegroups.com>
On Monday, June 22, 2020 at 5:51:50 PM UTC+2, Warren wrote:
> I have a GNAT project that has these pragma statements embedded to get the sucker to link. However, the directory is only valid for an instance on my Mac, so I need a better solution to replace:
>
> pragma Linker_Options("-L/usr/local/Cellar/readline/8.0.4/lib");
> pragma Linker_Options("-lreadline");
>
> I've tried to find the solution in the gnat documents but they seem to fall short of what I need to do (could not find an example nor direction in this -- perhaps I missed it).
>
> My project file looks something like this:
>
> project MyProject is
> for Languages use ("ada", "c");
> for Source_Dirs use ("src");
> for Object_Dir use "obj";
> for Main use ("main.adb");
> end MyProject;
>
> I've tried a variety of gpr things, but unsuccessfully.
>
> Warren
Take a look at this tiny example project file: http://docs.adacore.com/live/wave/gprbuild/html/gprbuild_ug/gprbuild_ug/gnat_project_manager.html#tools-options-in-project-files
You want to configure the linker options in package Linker. You can select between Mac, Linux, Windows, whatever using scenario variables: http://docs.adacore.com/live/wave/gprbuild/html/gprbuild_ug/gprbuild_ug/gnat_project_manager.html#scenarios-in-projects
Regards,
Mark L
next prev parent reply other threads:[~2020-06-22 16:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 15:51 How to supply O/S linker arguments with gprbuild? Warren
2020-06-22 16:14 ` Mark Lorenzen [this message]
2020-06-22 16:30 ` Dennis Lee Bieber
2020-06-22 16:39 ` Dmitry A. Kazakov
2020-06-22 17:52 ` Warren
2020-06-22 20:07 ` Dmitry A. Kazakov
2020-06-22 20:43 ` Simon Wright
2020-06-22 20:59 ` Warren
2020-06-22 21:52 ` Simon Wright
2020-06-22 21:16 ` Dmitry A. Kazakov
2020-06-22 21:27 ` Warren
2020-06-22 21:47 ` Simon Wright
2020-06-22 22:08 ` Jeffrey R. Carter
2020-06-23 9:23 ` Björn Lundin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox