Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3593370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:34:06+00:00 2026-05-18T19:34:06+00:00

This is the linker error I’m getting. All the rest of my boost::filesystem things

  • 0

This is the linker error I’m getting. All the rest of my boost::filesystem things are resolving. I’m not understanding why this one does not. I thought it was a problem with boost 1.40, so I upgraded to 1.44 and the problem remains. I’m using #define BOOST_FILESYSTEM_VERSION 3 but I see no mention of last_write_time not being provided in that case. It seems the underlying implementation is missing, even though the api portion 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 yea, using Windows VS2008.

The code involved is:

time_t curTime = time(NULL);
bfs::last_write_time(bfs::path("TestData/PruneTest/completed/Batch001.DAT"), curTime);

Anyone else run into this?

And it happens with #define BOOST_FILESYSTEM_VERSION 2 as well. The Boost libraries I’m using are from boostpro (prebuilt, yea, 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:
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T19:34:07+00:00Added an answer on May 18, 2026 at 7:34 pm

    Ok, the problem is as simple as it is obtuse. In VS2008 and above time_t is 64 bits, unless you #define _USE_32_BIT_TIME_T. The boost libraries are compiled without this definition and therefore time_t is 64 bits for them. My project due to some legacy issues does define _USE_32_BIT_TIME_T and therefore generates the API with a 32 bit time.

    If you build a project that doesn’t use 32 bit time, it works as expected.

    I’m glad the C++ guys were smart enough to push the call signature into the linker with name mangling. If they hadn’t done that, I’d still be wondering what was going on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im getting this linker error that won't let me compile. It only happens on
relocation truncated to fit: R_X86_64_PC32 against `.bss' I'm getting this linker error in g++
Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
I'm getting this linker error. I know a way around it, but it's bugging
I am getting this linker error in my Visual Studio 2010 project: ASWHighScores.obj :
I am getting this linker error. mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in
I am getting a linker error building this code: Exclude.h file class IsExclude {
I am getting this linker error when trying to compile the c++ project for
I'm getting this weird linker error using gcc, thought the code works fine when
I get this strange linker error: ld: in /Users/.../test project/iSMP.framework/iSMP, file too small for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.