C++ Boost文件系统教程赢得';不编译

C++ Boost文件系统教程赢得';不编译,c++,boost,codeblocks,C++,Boost,Codeblocks,我尝试用代码::块编译boost文件系统 它会出现这些错误 Linking console executable: bin\Debug\Boost fs tut1.exe obj\Debug\main.o: In function `_static_initialization_and_destruction_0': D:/Documents/Coding/Libs/boost/boost/system/error_code.hpp:214: undefined reference to `bo

我尝试用代码::块编译boost文件系统 它会出现这些错误

Linking console executable: bin\Debug\Boost fs tut1.exe
obj\Debug\main.o: In function `_static_initialization_and_destruction_0':
D:/Documents/Coding/Libs/boost/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
D:/Documents/Coding/Libs/boost/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
D:/Documents/Coding/Libs/boost/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
obj\Debug\main.o: In function `ZN5boost11filesystem34path7codecvtEv':
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/path.hpp:388: undefined reference to `boost::filesystem3::path::wchar_t_codecvt_facet()'
obj\Debug\main.o: In function `convert':
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/path_traits.hpp:113: undefined reference to `boost::filesystem3::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, int> const&)'
obj\Debug\main.o: In function `file_size':
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/operations.hpp:366: undefined reference to `boost::filesystem3::detail::file_size(boost::filesystem3::path const&, boost::system::error_code*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
6 errors, 0 warnings
链接控制台可执行文件:bin\Debug\Boost fs tut1.exe
obj\Debug\main.o:在函数“\u static\u initialization\u and\u destruction\u 0”中:
D:/Documents/Coding/Libs/boost/boost/system/error\u code.hpp:214:未定义对“boost::system::generic\u category()的引用”
D:/Documents/Coding/Libs/boost/boost/system/error\u code.hpp:215:未定义对“boost::system::generic\u category()的引用”
D:/Documents/Coding/Libs/boost/boost/system/error\u code.hpp:216:未定义对“boost::system::system\u category()的引用”
obj\Debug\main.o:在函数“zn5boost11文件系统34path7codecvtev”中:
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/path.hpp:388:boost::filesystem3::path::wchar\u t\u codecvt\u facet()的未定义引用
obj\Debug\main.o:在函数“convert”中:
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/path_traits.hpp:113:boost::filesystem3::path_traits::convert(char const*,char const*,std::basic_string&,std::codevt const&)的未定义引用
obj\Debug\main.o:在函数“文件大小”中:
D:/Documents/Coding/Libs/boost/boost/filesystem/v3/operations.hpp:366:对“boost::filesystem3::detail::file_size(boost::filesystem3::path const&,boost::system::error_code*)的未定义引用
collect2:ld返回了1个退出状态
进程以状态1终止(0分0秒)
6个错误,0个警告

我在windows 7上运行它,代码::Blocks version 10.5、G++version 4.4.1和boost version 1.47是boost的一部分。系统位于单独构建的库中。它不是所有的头文件。你必须构建它并链接到它

请参见示例(linux)和(代码块)


希望这有帮助

我用代码块的说明重建了这个库,它成功了!(显然是Boost为VC++构建的构建工具,并将其放在一个模糊的目录中)