我收到这个错误:
CXX luascript.o
In file included from /usr/include/boost/filesystem.hpp:15:0,
from luascript.cpp:21:
/usr/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
# error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
^
make[1]: *** [luascript.o] Error 1
make[1]: Leaving directory `/root/src.DEB'
make: *** [all] Error 2
我以前编译过这个,但我不记得见过这个。
luascript.cpp 的第 21 行是 #include <boost/filesystem.hpp>
我该怎么做才能解决这个问题?
我在 Debian 7 上使用最新的软件包和 gcc 4.8.2
最佳答案
您的 LUA 库需要一个(现已过时)旧版本的 Boost 文件系统。
Remove Filesystem Version 2 from the distribution. Version 3 is now the only distributed version. Those still using V2 are urged to migrate to V3 as soon as possible.
注意,boost 1.50.0 发布于2012 年 6 月 28 日 12:48 GMT。
因此,敦促您的库供应商迁移到 V3 :)
关于c++ - 使用 boost 编译时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21666446/