Re: [AMBER] Testing C++11 support: Not present

From: Gustaf Olsson <>
Date: Fri, 12 Oct 2018 06:28:25 +0000

Hello again, sorry I have been teaching classes all week!

Here we go:

clang++ -O3 -o testp testprogram.cpp

No messages, no errors.

$ Testing

So far so good

clang++ -O3 -std=c++11 -o testp testprogram.cpp

No messages, no errors.

$ Testing

Onwards and upwards

clang++ -O3 -stdlib=libstdc++ -o testp testprogram.cpp

And bom goes the dynamite:

clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the
      command line to use the libc++ standard library instead
testprogram.cpp:1:10: fatal error: 'cstdio' file not found
#include <cstdio>
1 warning and 1 error generated.

I saw Andrew Schaubs response as well stating the following:

StackExchange referenced twitter about libstdc++ and it's removal from
Xcode 10.0. The suggested work around was to install Xcode 9.4, and simply
copy the folders over:


"PSA: libstdc++ is gone from the iOS 12.0 SDK (it is present in the runtime
for binary compatibility). It's days are numbered on macOS as well. Migrate
over to libc++ if you haven't already. #WWDC2018 #cplusplus" .jeremyhu

So obviously the libstdc++ is the issue. It should be replaced using libc++ instead, which I assume is a bunch of work. The workaround that Andrew provided might actually work, I do have my backups from where I could just pull the lib file/files i need. I will most likely try this since I have a hard time not leaving things undone though this is not a solution for the mac-related issues obviously.

Thank you everyone for you help and input, I really enjoy posting to the AMBER forum since there is always good people providing excellent support here!

Best regards
// Gustaf

On 10 Oct 2018, at 15:52, Daniel Roe <<>> wrote:

clang++ -O3 -o testp testprogram.cpp

AMBER mailing list
Received on Thu Oct 11 2018 - 23:30:03 PDT
Custom Search