错误的提高文件系统 [英] error on boost filesystem
本文介绍了错误的提高文件系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试着在我的Mac使用升压文件系统。我只加了下面的头,并得到一个错误,当我试图编译
I try to use boost filesystem on my Mac. I only added the following header and got an error when I tried to compile
# include <boost/filesystem.hpp>
误差
Undefined symbols for architecture x86_64:
"boost::system::generic_category()", referenced from:
__static_initialization_and_destruction_0(int, int) in cclyDZox.o
"boost::system::system_category()", referenced from:
__static_initialization_and_destruction_0(int, int) in cclyDZox.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
任何帮助pciated AP $ P $
any help is appreciated
推荐答案
您需要添加boost_system库:
You need to add the boost_system library:
-lboost_system
到您的构建命令。请注意,您还需要提供-lboost_system库了。
to your build command. Note that you will also need to provide the -lboost_system library too.
如果您的项目之后建立,但与一些呻吟像
If your project thereafter builds but moans with something like
dyld: Library not loaded: libboost_filesystem.dylib
您只需要设置环境变量
DYLD_LIBRARY_PATH
要包括你
$BOOST_HOME/lib
如前所述目录的这里。
这篇关于错误的提高文件系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文