comp.lang.ada
 help / color / mirror / Atom feed
From: Roger <rogermcm2@gmail.com>
Subject: Re: Question for MacOS users of GNAT, gcc, and clang
Date: Tue, 10 Sep 2019 04:31:35 -0700 (PDT)
Date: 2019-09-10T04:31:35-07:00	[thread overview]
Message-ID: <189a9e64-4238-4c75-b76d-75e6e63466c4@googlegroups.com> (raw)
In-Reply-To: <567df5c4-2d91-4520-a30e-c210c3f3c515@googlegroups.com>

On Saturday, September 7, 2019 at 9:01:20 AM UTC+10, John Perry wrote:
> Hello all
> 
> I spent about 2 hours yesterday trying to figure out why a C++ program I've been working on a while wouldn't compile, link, or even run (depending on what precise sequence of tricks I tried). I knew something had to be horribly wrong because dyld insisted that it couldn't find the standard library's "thread.join()" method, but the only thing I knew for certain was that the computer had recently rebooted.
> 
> Eventually I discovered that the problem was in my PATH variable, because GNAT expects/requires gcc, whereas the default compiler on MacOS is clang, which I need for various reasons not worth getting into. But, for instance, gcc was compiling with the expectation that the program would find libstdc++ at runtime, whereas MacOS links to libc++, which is why the program wouldn't build once I had it running.
> 
> This was reasonably easily fixed, and hopefully I'll remember next time, but I was wondering what other MacOS Ada & C++ developers do to avoid this: Run a script when you want to start Ada? Dump clang altogether and live with gcc? Something else?
> 
> thanks
> john perry

I run gprconfig to select the appropriate compilers which generates a default.cgpr file which I configure my Build Targets with using --config=<path>/default.cgpr

      reply	other threads:[~2019-09-10 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 23:01 Question for MacOS users of GNAT, gcc, and clang John Perry
2019-09-10 11:31 ` Roger [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox