未定义的引用`boost :: filesystem :: detail :: copy_file

时间:2018-05-24 08:31:35

标签: boost makefile undefined-reference honeypot

我正在尝试在CentOS 7机器上安装Nova和HoneyD,但我发现自己遇到了问题。

问题是我使用命令make后会出现以下错误:

Config.cpp:(.text+0xa2d6): undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
../../NovaLibrary/Release//libNovaLibrary.a(NovaUtil.o): In function `Nova::RecursiveDirectoryCopy(boost::filesystem::path const&, boost::filesystem::path const&, bool)':
NovaUtil.cpp:(.text+0x25a4): undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[2]: *** [novad] Error 1
make[2]: Leaving directory `/usr/share/Nova/Novad/Release'
make[1]: *** [novad-release] Error 2
make[1]: Leaving directory `/usr/share/Nova'
make: *** [release] Error 2

我怎么能解决这个问题?

1 个答案:

答案 0 :(得分:0)

我找到了解决自己问题的方法。

解决方案是编辑文件Config.cpp并替换行:

SELECT DISTINCT product_id FROM RESERVES
WHERE start_res_date >= finish_date OR finish_res_date <= start_date

对于以下内容:

#include <boost/filesystem.hpp>

在我这样做后,我不再收到错误。