我在Mac OSX Yosemite 10.10.3上,并且brew install boost没有正确编译boost。例如,运行
g++ -I/usr/local/Cellar/include -x c++ -E /dev/null -include boost/version.hpp && echo SUCCESS:
给了我
# 1 "/dev/null"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 326 "<built-in>" 3
# 1 "<command line>" 1
In file included from <built-in>:326:
<command line>:1:10: fatal error: 'boost/version.hpp' file not found
#include "boost/version.hpp"
^
# 1 "<built-in>" 2
# 1 "/dev/null" 2
我注意到通过Brew安装获得的目录结构与此处列出的目录结构大不相同:http://www.boost.org/doc/libs/1_35_0/more/getting_started/unix-variants.html这可能不会影响任何内容。
答案 0 :(得分:0)
该命令应改为
g++ -I/usr/local/include -x c++ -E /dev/null -include boost/version.hpp && echo SUCCESS