上下文
我正在尝试编译包"root_numpy",它是科学分析软件"root"和python包"numpy"之间的链接.它被用作根包装器"rootpy"的一部分.执行以下行时出现g ++错误:
g++ -bundle -undefined dynamic_lookup -g -arch x86_64 -headerpad_max_install_names
-arch x86_64 build/temp.macosx-10.6-x86_64-2.7/root_numpy/src/_librootnumpy.o
-o build/lib.macosx-10.6-x86_64-2.7/root_numpy/_librootnumpy.so
-L/Users/bwells/bin/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d
-lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread
-lpthread -Wl,-rpath,/Users/bwells/bin/root/lib -stdlib=libc++ -lm -ldl
-lTreePlayer
g++: error: unrecognized command line option '-stdlib=libc++'
Run Code Online (Sandbox Code Playgroud)
当我使用标志编译"hello world"程序时会出现同样的问题:
dhcp-130-112:helloworld bwells$ g++ -stdlib=libc++ helloworld.cpp
g++: error: unrecognized command line option '-stdlib=libc++'
Run Code Online (Sandbox Code Playgroud)
没有那个标志,它编译得很好:
dhcp-130-112:helloworld bwells$ g++ helloworld.cpp
dhcp-130-112:helloworld bwells$ ls
a.out helloworld.cpp
Run Code Online (Sandbox Code Playgroud)
我的编译器版本是:
dhcp-130-112:helloworld bwells$ g++ --version
g++ (MacPorts gcc48 4.8.2_2) 4.8.2
Copyright …Run Code Online (Sandbox Code Playgroud)