c++ - MacPorts clang not using its own headers -
i'm trying emscripten work on os x 10.8, see this post related issues there. apparently clang++
version shipped xcode old, got recent clang 3.7.0 using macports. told cmake use compiler (passing -dcmake_cxx_compiler=clang++-mp-3.7
on command line), still fails:
[ 33%] building cxx object cmakefiles/optimizer.dir/parser.cpp.o /opt/local/bin/clang++-mp-3.7 -std=c++11 -fno-exceptions -fno-rtti -o3 -dndebug -o cmakefiles/optimizer.dir/parser.cpp.o -c …/emsdk/emscripten/master/tools/optimizer/parser.cpp in file included …/emsdk/emscripten/master/tools/optimizer/parser.cpp:2: in file included …/emsdk/emscripten/master/tools/optimizer/parser.h:12: …/emsdk/emscripten/master/tools/optimizer/istring.h:3:10: fatal error: 'unordered_set' file not found #include <unordered_set> ^ 1 error generated.
i can reproduce issue launching compiler command line. in parallel build mode, it's instead complaining <cstdint>
optimizer.cpp
instead. both these headers exist in /opt/local/libexec/llvm-3.7/include/c++/v1/
.
- what's canonical way use macports-installed version of
clang++
including headers? have use-i
, work out full path, or there shorter? - can safely without switching runtime library 1 shipped macports' clang? if not, can somehow encode full path of runtime library created binary, either single library or using
-rpath
argumentld
or equivalent alternative?
update: unresolved symbols when try link stuff after specifying include directory manually, , don't know how solve that.libcxx
package macports empty except readme file.
i've solved original problem adding cxxflags=--stdlib=libc++
environment. system version of clang need. flag works magic macports' version of clang
well: specifying successful build, , can verify (using -e
compiler switch) it's using headers mentioned before. i'm still not whether there ensure headers match system's version of libc++
, though.
Comments
Post a Comment