簡體   English   中英

Boost錯誤:Boost.Filesystem V3和更高版本需要std :: wstring支持

[英]Boost error : Boost.Filesystem V3 and later requires std::wstring support

此錯誤是什么意思,如何解決?

Boost.Filesystem V3 and later requires std::wstring support

我剛開始使用boost :: filesystem並收到此錯誤。 簡單地添加以下行會導致錯誤。

#include <Boost/filesystem.hpp>

我在Windows 7上編譯,不確定編譯器,我在使用Devc ++,並且在Devc ++目錄中有一個MinGW64文件夾,所以也許它是MinGW64嗎?

好吧,如果您查看boost標頭,您將獲得:

# if defined( BOOST_NO_STD_WSTRING )
#   error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
# endif

所以..那么您想知道BOOST_NO_STD_WSTRING是什么..那么它位於Boost / Config目錄中。 運行快速目錄范圍的ctrl + f,您將獲得:

boost\config\platform\amigaos.hpp
boost\config\platform\symbian.hpp
boost\config\stdlib\libstdcpp3.hpp
boost\config\stdlib\modena.hpp
boost\config\stdlib\sgi.hpp
boost\config\stdlib\stlport.hpp

因此,如果您使用這些平台或標准庫,那么將為您定義該宏。 因此,根據您的信息,您可能正在libstdc ++ 3上運行

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM