boost::filesystem: Link errors -
boost::filesystem: Link errors -
i have x.cpp include:
#include <boost/filesystem.hpp> #include <boost/filesystem/path.hpp> namespace fs = boost::filesystem; in x.cpp write even:
void get_all_files(const boost::filesystem::path& root, std::map<std::string,std::string> &filenames) { if (!boost::filesystem::exists(root)) return; } if remove "if line" project build without error if maintain line it's horror in error list
class="snippet-code-html lang-html prettyprint-override">15> generating code... 15>libcpmtd.lib(wlocale.obj) : error lnk2005: "public: __thiscall std::_container_base12::_container_base12(void)" (??0_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(wlocale.obj) : error lnk2005: "public: __thiscall std::_container_base12::~_container_base12(void)" (??1_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(wlocale.obj) : error lnk2005: "public: void __thiscall std::_container_base12::_orphan_all(void)" (?_orphan_all@_container_base12@std@@qaexxz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(locale.obj) : error lnk2005: "public: __thiscall std::_container_base12::_container_base12(void)" (??0_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(locale.obj) : error lnk2005: "public: __thiscall std::_container_base12::~_container_base12(void)" (??1_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(locale.obj) : error lnk2005: "public: void __thiscall std::_container_base12::_orphan_all(void)" (?_orphan_all@_container_base12@std@@qaexxz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(xlocale.obj) : error lnk2005: "public: __thiscall std::_container_base12::_container_base12(void)" (??0_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(xlocale.obj) : error lnk2005: "public: __thiscall std::_container_base12::~_container_base12(void)" (??1_container_base12@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(xlocale.obj) : error lnk2005: "public: void __thiscall std::_container_base12::_orphan_all(void)" (?_orphan_all@_container_base12@std@@qaexxz) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(xlock.obj) : error lnk2005: "public: __thiscall std::_lockit::_lockit(int)" (??0_lockit@std@@qae@h@z) defined in msvcprtd.lib(msvcp100d.dll) 15>libcpmtd.lib(xlock.obj) : error lnk2005: "public: __thiscall std::_lockit::~_lockit(void)" (??1_lockit@std@@qae@xz) defined in msvcprtd.lib(msvcp100d.dll) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: __int64 __thiscall std::ios_base::width(__int64)" (?width@ios_base@std@@qae_j_j@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@du?$char_traits@d@std@@@std@@qaehd@z) defined in libcpmtd.lib(locale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@qbehxz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: __int64 __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@qbe_jxz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: static void __cdecl std::locale::facet::operator delete(void *)" (??3facet@locale@std@@saxpax@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: void __thiscall std::locale::facet::_incref(void)" (?_incref@facet@locale@std@@qaexxz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "private: static class std::locale::_locimp * __cdecl std::locale::_getgloballocale(void)" (?_getgloballocale@locale@std@@capav_locimp@12@xz) defined in libcpmtd.lib(locale0.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "private: static class std::locale::_locimp * __cdecl std::locale::_init(void)" (?_init@locale@std@@capav_locimp@12@xz) defined in libcpmtd.lib(locale0.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: class std::locale::facet * __thiscall std::locale::facet::_decref(void)" (?_decref@facet@locale@std@@qaepav123@xz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "protected: virtual __thiscall std::codecvt<wchar_t,char,int>::~codecvt<wchar_t,char,int>(void)" (??1?$codecvt@_wdh@std@@mae@xz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: static void __cdecl std::locale::facet::operator delete(void *,struct std::_debugheaptag_t const &,char *,int)" (??3facet@locale@std@@saxpaxabu_debugheaptag_t@2@padh@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: class std::_yarn<char> & __thiscall std::_yarn<char>::operator=(char const *)" (??4?$_yarn@d@std@@qaeaav01@pbd@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: static unsigned int __cdecl std::codecvt<wchar_t,char,int>::_getcat(class std::locale::facet const * *,class std::locale const *)" (?_getcat@?$codecvt@_wdh@std@@saipapbvfacet@locale@2@pbv42@@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "private: void __thiscall std::locale::_locimp::_addfac(class std::locale::facet *,unsigned int)" (?_addfac@_locimp@locale@std@@aaexpavfacet@23@i@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: __thiscall std::locale::id::operator unsigned int(void)" (??bid@locale@std@@qaeixz) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "public: static void * __cdecl std::locale::facet::operator new(unsigned int,struct std::_debugheaptag_t const &,char *,int)" (??2facet@locale@std@@sapaxiabu_debugheaptag_t@2@padh@z) defined in libcpmtd.lib(wlocale.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "struct std::_debugheaptag_t const & __cdecl std::_debugheaptag_func(void)" (?_debugheaptag_func@std@@yaabu_debugheaptag_t@1@xz) defined in libcpmtd.lib(xdebug.obj) 15>msvcprtd.lib(msvcp100d.dll) : error lnk2005: "protected: virtual __thiscall std::locale::_locimp::~_locimp(void)" (??1_locimp@locale@std@@mae@xz) defined in libcpmtd.lib(locale0.obj)
two of import things:
1.the code working on little console project 2.i read lot of post other people suffer because of disgustful errors , suggest alter runtime library /mdd /mt. project not working dll project. thank in advanced!!
boost linker-error
Comments
Post a Comment