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

From: Gustaf Olsson <gustaf.olsson.lnu.se>
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.

./testp
$ Testing

So far so good

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

No messages, no errors.

./testp
$ 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
      [-Wstdlibcxx-not-found]
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:

cp
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/libstdc++.*
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/
cp
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libstdc++.*
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

"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
https://stackoverflow.com/questions/50694822/xcode-10-ios-12-does-not-contain-libstdc6-0-9

https://twitter.com/jeremyhu/status/1003882060556062720

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 <daniel.r.roe.gmail.com<mailto:daniel.r.roe.gmail.com>> wrote:

clang++ -O3 -o testp testprogram.cpp

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Oct 11 2018 - 23:30:03 PDT
Custom Search