提高文件系统的教程不会编译 [英] Boost filesystem tutorial won't compile

查看:127
本文介绍了提高文件系统的教程不会编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译提高文件系统教程在code :: Blocks的
而且它出现这些错误

I try to compile the boost filesystem tutorial in Code::Blocks And it comes up these errors

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

我运行它与code :: Blocks的10.5版本,G ++版本4.4.1,并提升1.47版本

I'm running it on windows 7 with Code::Blocks version 10.5, G++ version 4.4.1, and boost version 1.47

推荐答案

Boost.System的一大块住在被单独建一个图书馆。这是不是所有的头文件。你必须建立它并链接到它。

A chunk of Boost.System lives in a library that is built seperately. It is not all header files. You have to build it and link to it.

请参阅问题链接Boost库在Linux中一个例子(Linux版)和 HTTP://wiki.$c$cblocks.org/index.php?标题= BoostWindowsQuickRef ($ C $个cblocks)

See Problem Linking Boost Library in Linux for one example (linux) and http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef (CodeBlocks)

希望这有助于!

这篇关于提高文件系统的教程不会编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆