This is the linker error I get. Everything else from my boost :: filesystem stuff is allowed. I do not understand why this is not. I thought this was a problem with boost 1.40, so I upgraded to 1.44 and the problem remained. I am using #define BOOST_FILESYSTEM_VERSION 3 , but I do not see mention that last_write_time is not provided in this case. It seems that the main implementation is missing, although part of the api is present.
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 )
Oh yes, using Windows VS2008.
Used code:
time_t curTime = time(NULL); bfs::last_write_time(bfs::path("TestData/PruneTest/completed/Batch001.DAT"), curTime);
Anyone else come across this?
And this happens with #define BOOST_FILESYSTEM_VERSION 2 . The Boost libraries I use are boostpro (pre-built, yes, I'm lazy)
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)
From / versbose: 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: