0

So I have read the answers on thread about this same issue here. But no answers could fix my issue. I am using Visual Studio 2017 (v141) and so built the lib files with -vc141-.

When I turned on \verbose for the linker I noticed something was off.

1>Starting pass 1
1>Processed /DEFAULTLIB:msvcprtd
1>Processed /DEFAULTLIB:libboost_date_time-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_filesystem-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_system-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:uuid.lib
1>Processed /DEFAULTLIB:MSVCRT
1>Processed /DEFAULTLIB:OLDNAMES
1>Processed /DEFAULTLIB:MSVCMRT
1>Processed /DEFAULTLIB:MSCOREE
1>Barrage.obj : /DEBUG:FASTLINK is not supported when managed code is present; restarting link with /DEBUG:FULL
1>
1>Invoking LINK.EXE:
1> /ERRORREPORT:PROMPT @C:\Users\oliviefr\AppData\Local\Temp\tmpdc1f49624fae4111864f892383898874.rsp
1> /DEBUG:FORCEFULL
1>
1>Starting pass 1
1>Processed /DEFAULTLIB:msvcprtd
1>Processed /DEFAULTLIB:libboost_date_time-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_filesystem-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_system-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:uuid.lib
1>Processed /DEFAULTLIB:MSVCRT
1>Processed /DEFAULTLIB:OLDNAMES
1>Processed /DEFAULTLIB:MSVCMRT
1>Processed /DEFAULTLIB:MSCOREE
1>LINK : MSIL module encountered; incremental linking is disabled for MSIL; performing full link
1>
1>Invoking LINK.EXE:
1> /ERRORREPORT:PROMPT @C:\Users\oliviefr\AppData\Local\Temp\tmpdc1f49624fae4111864f892383898874.rsp /DEBUG:FORCEFULL
1> /incremental:no
1> /nologo
1> /fullbuild
1>
1>Starting pass 1
1>Processed /DEFAULTLIB:msvcprtd
1>Processed /DEFAULTLIB:libboost_date_time-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_filesystem-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:libboost_system-vc110-mt-gd-1_51.lib
1>Processed /DEFAULTLIB:uuid.lib
1>Processed /DEFAULTLIB:MSVCRT
1>Processed /DEFAULTLIB:OLDNAMES
1>Processed /DEFAULTLIB:MSVCMRT
1>Processed /DEFAULTLIB:MSCOREE
1>
1>Searching libraries
1>    Searching C:\Program Files\MATLAB\R2017a\extern\lib\win64\microsoft\libmat.lib:
1>    Searching C:\Program Files\MATLAB\R2017a\extern\lib\win64\microsoft\libmx.lib:
1>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib'
1>Done building project "CequeauQuantite.vcxproj" -- FAILED.

What is the Processed /DEFAULTLIB:libboost_date_time-vc110-mt-gd-1_51.lib ? Why is it being called? I am still a beginner with programming and don't understand much of this output.

I can upload images later on (there's an error with imgure right now) showing my properties or I could paste the *.vcxproj file. Thanks

Hawoona
  • 31
  • 7
  • If this is Visual Studio 2017 you are using the wrong boost binaries. These are for Visual Studio 2012 only. It is UB to even use these for any other compiler. Also boost-1.51 is pretty old. I would get a more recent boost built for VS 2017. – drescherjm Aug 07 '18 at 17:04
  • Thanks for the answer. I have a few questions. What does UB mean, also I am not trying to use `libboost_date_time-vc110-mt-gd-1_51.lib` at all but it seems it is the default. Should I then just open the program on Visual Studio 2012 or would it be better to simply update to a more recent boost? Are there any risk to the code if I get a more recent boost build? – Hawoona Aug 07 '18 at 18:23
  • Undefined Behavior. Your program can crash or experience unexpected behavior / wrong results ... by using these incompatible binaries with any compiler other than Visual Studio 2012. This is why boost provides per compiler binaries. – drescherjm Aug 07 '18 at 18:32
  • ***would it be better to simply update to a more recent boost?*** I would recommend doing that. boost-1.51 is very old. – drescherjm Aug 07 '18 at 18:33

1 Answers1

0

Boost 1.51 is waaaay too old for VS2017. It originates from 2012, and was never compiled or tested for use with VS2017. Update to the most recent boost library, found here, and go through your normal build process.

Xirema
  • 19,889
  • 4
  • 32
  • 68