Autotools / libtool link library with libstdC ++, although the -stdlib = libC ++ option has been passed for configuration

I am trying to create google-glog on Mac OS X 10.8 using the following options:

./configure CXX = 'clang ++' CXXFLAGS = '- std = C ++ 11 -stdlib = libC ++'

Despite the fact that the library is associated with libstdc ++.

Why and how to fix it?

+4
source share
1 answer

It is better to put the “dialect” and runtime flags in the compiler variable, since it will use these flags for linking - not only the original compilation: CXX="clang++ -std=c++11 -stdlib=libc++"

Save CXXFLAGS for things like -W -Wall -O2 -march=xxx , etc.

+7
source

All Articles