OSX and Clang stdlibc++ warning

  • @Martin:
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
    Did you have a look into this?

    I've been playing around to see if I can solve it with the stdcpp tool. I've managed to get rid of it by using

    Code
    OPTS+=" -mmacosx-version-min=10.9 -std=gnu++0x -stdlib=libc++"


    and change Execute "g++" to

    Code
    If HostOS="macos"
        Execute "clang++"+OPTS+" -o "+out+" main.cpp"+LIBS
    Else
        Execute "g++"+OPTS+" -o "+out+" main.cpp"+LIBS
    Endif


    but I had to add

    C
    #include <unistd.h>
    #include <pthread.h>


    to the bottom of the __APPLE__ define in the target stdcpp template, to avoid errors with chdir etc.

    So far it's working OK for transcc, but would need more testing.

  • I've been doing a bit of reading up on libstdc++ and libc++ differences.
    One of the main differences is with the use of templates and that Apple basically didn't bother to add C++11 support to libstdc++. As far as I'm aware it's still on version 4.2.

    I do need to read up on LLVM when I get a chance. It's not something that your average Windows or Linux user would use.

    Edited once, last by dawlane (October 6, 2017 at 1:16 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!