comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <john.perry@usm.edu>
Subject: Question for MacOS users of GNAT, gcc, and clang
Date: Fri, 6 Sep 2019 16:01:18 -0700 (PDT)
Date: 2019-09-06T16:01:18-07:00	[thread overview]
Message-ID: <567df5c4-2d91-4520-a30e-c210c3f3c515@googlegroups.com> (raw)

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


             reply	other threads:[~2019-09-06 23:01 UTC|newest]

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

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