c++11 - Autotools/libtool 链接库与 libstdc++,尽管 -stdlib=libc++ 选项传递给配置

标签 c++11 clang autotools libtool glog

我正在尝试使用以下选项在 Mac OS X 10.8 上构建 google-glog:

./configure CXX='clang++' CXXFLAGS='-std=c++11 -stdlib=libc++'

尽管该库已与 libstdc++ 链接。

为什么以及如何解决这个问题?

最佳答案

最好将“方言”和运行时标志放入编译器变量中,因为它将使用这些标志进行链接 - 而不仅仅是源编译:CXX="clang++ -std=c++11 -stdlib=libc++ “

保存CXXFLAGS,例如-W -Wall -O2 -march=xxx等。

关于c++11 - Autotools/libtool 链接库与 libstdc++,尽管 -stdlib=libc++ 选项传递给配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16248360/

相关文章:

c - 使用 GNU Autotools 获取 GCC 包含路径

autotools - 如何为 GNU Autotools 重新配置大型程序

c++ - Clang 的写法中的 "annotated fallthrough"和 "partly annotated method"是什么?

c++ - Windows 上 emacs 中的 Company-clang 模式

cmake - 适用于 Windows 和 Linux 编译的 Autotools 与 CMake

c++ - 为什么 std::add_lvalue_reference 的行为不如预期?

c++ - 奇怪的 Clang 行为

c++ - 指向堆栈分配对象的指针和引用

c++ - make_tuple 的构建问题 - 数组引用

gcc - "lowered vtable references"是什么?