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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:4b42:: with SMTP id y63mr11692944qka.450.1567810878969; Fri, 06 Sep 2019 16:01:18 -0700 (PDT) X-Received: by 2002:aca:1e03:: with SMTP id m3mr8572873oic.99.1567810878688; Fri, 06 Sep 2019 16:01:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!o24no6557071qtl.0!news-out.google.com!d29ni897qtg.1!nntp.google.com!o24no6557068qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 6 Sep 2019 16:01:18 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:3c3:401:f550:4928:57aa:b63:4ca4; posting-account=JSxOkAoAAADa00TJoz2WZ_46XrZCdXeS NNTP-Posting-Host: 2601:3c3:401:f550:4928:57aa:b63:4ca4 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <567df5c4-2d91-4520-a30e-c210c3f3c515@googlegroups.com> Subject: Question for MacOS users of GNAT, gcc, and clang From: John Perry Injection-Date: Fri, 06 Sep 2019 23:01:18 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57114 Date: 2019-09-06T16:01:18-07:00 List-Id: 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 horrib= ly 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 G= NAT expects/requires gcc, whereas the default compiler on MacOS is clang, w= hich 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 would= n't build once I had it running. This was reasonably easily fixed, and hopefully I'll remember next time, bu= t I was wondering what other MacOS Ada & C++ developers do to avoid this: R= un a script when you want to start Ada? Dump clang altogether and live with= gcc? Something else? thanks john perry