Cannot open include file: 'initializer_list'

一世执手 提交于 2019-12-14 02:17:44

问题


I want to compile The Forgotten Server (Tibia OTServer) on Microsoft Visual Studio 2012 (MSVC). But at the file: unordered_set.hpp I have this:

#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
#include <initializer_list>
#endif

and is giving me the errors:

boost/unordered/unordered_set.hpp(27): fatal error C1083: Cannot open include file: 'initializer_list': No such file or directory (..\spells.cpp)

boost/unordered/unordered_set.hpp(27): fatal error C1083: Cannot open include file: 'initializer_list': No such file or directory (..\talkaction.cpp)

What can I do?


By defining BOOST_NO_0X_HDR_INITIALIZER_LIST now I have the following error:

..\scriptmanager.cpp(147): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Alloc>'
          with
          [
              _Elem=char,
              _Traits=std::char_traits<char>,
              _Alloc=std::allocator<char>
          ]

at:

std::string s = BOOST_DIR_ITER_FILENAME(it);

来源:https://stackoverflow.com/questions/14471340/cannot-open-include-file-initializer-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!