Это ошибка компоновщика, которую я получаю. Все остальное в моей поддержке boost :: filesystem. Я не понимаю, почему это не так. Я думал, что это проблема с бустом 1.40, поэтому я обновился до 1.44, и проблема остается. Я использую #define BOOST_FILESYSTEM_VERSION 3
, но не вижу упоминания о том, что last_write_time не было предоставлено в этом случае. Кажется, что базовая реализация отсутствует, хотя часть API присутствует.
1>TestPruner.obj : error LNK2019: unresolved external symbol "void __cdecl boost::filesystem3::detail::last_write_time(class boost::filesystem3::path const &,long,class boost::system::error_code *)" (?last_write_time@detail@filesystem3@boost@@YAXABVpath@23@JPAVerror_code@system@3@@Z) referenced in function "void __cdecl boost::filesystem3::last_write_time(class boost::filesystem3::path const &,long)" (?last_write_time@filesystem3@boost@@YAXABVpath@12@J@Z)
О да, используя Windows VS2008.
Используемый код:
time_t curTime = time(NULL);
bfs::last_write_time(bfs::path("TestData/PruneTest/completed/Batch001.DAT"), curTime);
Кто-нибудь еще сталкивался с этим?
И это также происходит с #define BOOST_FILESYSTEM_VERSION 2
. Используемые мной библиотеки Boost от boostpro (предварительно, да, я ленивый)
2>TestPruner.obj : error LNK2019: unresolved external symbol "class boost::system::error_code __cdecl boost::filesystem2::detail::last_write_time_api(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,long)" (?last_write_time_api@detail@filesystem2@boost@@YA?AVerror_code@system@3@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@J@Z) referenced in function "void __cdecl boost::filesystem2::last_write_time<class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> >(class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> const &,long)" (??$last_write_time@V?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@@filesystem2@boost@@YAXABV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@01@J@Z)
От / вербос: lib
Searching e:\Program Files\boost\boost_1_44\lib\libboost_thread-vc90-mt-gd-1_44.lib:
Searching e:\Program Files\boost\boost_1_44\lib\libboost_date_time-vc90-mt-gd-1_44.lib: