In XCode clang 11 (c++) I get: No template named 'initializer-list' in namespace 'std'
How do I get XCode to work?
When someone on my team executes:
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake .. -G Xcode
using XCode 10, and then opens the xcodeproj folder, Xcode starts and everything compiles.
In his project.pbxproj file are:
OTHER_CPLUSPLUSFLAGS = "-std=c++11 -pthread -fstrict-aliasing -Wall -Wcast-qual -Wextra -Wformat -Wpedantic -Wswitch-default -Wno-unknown-pragmas
OTHER_LDFLAGS = " -Wl,-search_paths_first -Wl,-headerpad_max_install_names	$HEAD/sdsp/metrics/test/build/sws-metrics/Release/libsws-metrics.a";
It does not work for me when I do this using:
_Apple clang version 11.0.0 (clang-1100.0.33.17)
_I get compiler errors:
No template named 'initializer_list' in namespace 'std'
and
A space is required between consecutive right angle brackets (use '> >')
My OTHER_ variables are blank. I tried setting these to be like his- it didn't help.
In the project I tried all the various options for
Apple Clang - Language C Language Dialect - Compiler Default, c11, gnu11
Apple Clang - Language - C++ C Language Dialect - C11 [-std=c++11] (and gnu11 and the 14 and 17's)
C Standard Library - Compiler Default, libstdc, libc++
Apple Clang - Warnings - C++ Using C11 extensions in earlier versions of C - was No, I also trie Yes Nothing works.
We both create the makefiles from the same folder with:
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake .. -G Xcode
I also tried the 3.17.0 cmake I had in homebrew, and after upgrading it to 3.18.1. No difference.
Any idea what to do?
(I have an old XCode10.3, but it won't run- it tries to "install additional components" and fails...)
What am I missing, or is XCode 11 broken?