• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

OSX and Clang stdlibc++ warning

dawlane

Well-known member
CX Code Contributor
Tutorial Author
Joined
Jun 21, 2017
Messages
1,146
@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
Code:
#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.
 
Awesome, thanks for that!
 
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.
 
Last edited:
Yep. Apple used quite an old g++ compiler, I think that was one of the reasons to move to clang.
 
How's the cserver building?
 
Sorry for the late answer. It builds fine on MacOS, but have to try on my real Mac tonight as the VMWare stuff doesn't work with the GLFW target on MacOS.
 
Back
Top Bottom