I have clang++ 3.5, g++ 4.9.1, libc++ and Qt Creator installed on Ubuntu 14.04.1.
I usually use clang++ as compiler. But recently I found that libstdc++ from g++ used as C++ Standard Library. As I know the latter not fully supports C++14 innovations at the moment.
How to replace libstd++ with libc++ when project compiled with clang++?
What I already done (.pro
-file):
QMAKE_CXXFLAGS_CXX11 = -std=gnu++1y
CONFIG *= c++11
QMAKE_CXXFLAGS += -stdlib=libc++
LIBS += -stdlib=libc++
But the Qt Creator editor still uses libstdc++ as DEPENDPATH
when crawling through included files. How to fix such ill behaviour? Maybe should I fix something in mkspec files?
The standard library is specified in the mkspec files.
In linux, you can use : qmake -spec linux-clang-libc++
I think the equivalent in qtcreator is to define a new "kit" and specify "linux-clang-libc++" in the field "Qt mkspec"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With