none
Link boost library in VS2019 instead of system library RRS feed

  • Question

  • I have been linking boost library in VS2019 but VS2019 always links system library.

    I have tried :

    Added BOOST's header files Path : 
    project properties -> VC++ directories-> include directories.
    Added BOOST's library PATH : 
    project properties -> VC++ directories-> libraries directories.
    Added BOOST's libraries PATH : 
    Linker->General->Additional library directories.
    Ideally It should link "libboost_filesystem-vc142-mt-x64-1_70.lib" but in build order log no such linked library. I am suspecting that it is resolving calls from standard library. Please correct me in case wrong.

    Build order log:

    1>Starting pass 2
    1>     * CIL library *(* CIL module *)
    1>     * linker generated manifest res *
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     kernel32.lib(KERNEL32.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     msvcprt.lib(MSVCP140.dll)
    1>     MSVCRT.lib(amdsecgs.obj)
    1>     MSVCRT.lib(chkstk.obj)
    1>     MSVCRT.lib(guard_dispatch.obj)
    1>     MSVCRT.lib(gs_cookie.obj)
    1>     MSVCRT.lib(gs_report.obj)
    1>     MSVCRT.lib(gs_support.obj)
    1>     MSVCRT.lib(guard_support.obj)
    1>     MSVCRT.lib(loadcfg.obj)
    1>     MSVCRT.lib(dyn_tls_dtor.obj)
    1>     MSVCRT.lib(dyn_tls_init.obj)
    1>     MSVCRT.lib(matherr_detection.obj)
    1>     MSVCRT.lib(ucrt_detection.obj)
    1>     MSVCRT.lib(cpu_disp.obj)
    1>     MSVCRT.lib(argv_mode.obj)
    1>     MSVCRT.lib(commit_mode.obj)
    1>     MSVCRT.lib(default_local_stdio_options.obj)
    1>     MSVCRT.lib(denormal_control.obj)
    1>     MSVCRT.lib(env_mode.obj)
    1>     MSVCRT.lib(file_mode.obj)
    1>     MSVCRT.lib(fltused.obj)
    1>     MSVCRT.lib(invalid_parameter_handler.obj)
    1>     MSVCRT.lib(matherr.obj)
    1>     MSVCRT.lib(new_mode.obj)
    1>     MSVCRT.lib(thread_locale.obj)
    1>     MSVCRT.lib(std_type_info_static.obj)
    1>     MSVCRT.lib(tncleanup.obj)
    1>     MSVCRT.lib(delete_scalar.obj)
    1>     MSVCRT.lib(delete_scalar_size.obj)
    1>     MSVCRT.lib(new_scalar.obj)
    1>     MSVCRT.lib(throw_bad_alloc.obj)
    1>     MSVCRT.lib(exe_main.obj)
    1>     MSVCRT.lib(initializers.obj)
    1>     MSVCRT.lib(utility.obj)
    1>     MSVCRT.lib(ucrt_stubs.obj)
    1>     MSVCRT.lib(utility_desktop.obj)
    1>     MSVCRT.lib(initsect.obj)
    1>     MSVCRT.lib(gshandler.obj)
    1>     MSVCRT.lib(gshandlereh.obj)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     vcruntime.lib(VCRUNTIME140.dll)
    1>     ucrt.lib(api-ms-win-crt-time-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-time-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-time-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-stdio-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-runtime-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-math-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-locale-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-locale-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-locale-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-heap-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll)
    1>     ucrt.lib(api-ms-win-crt-convert-l1-1-0.dll)
    1>Finished pass 2
    Thursday, July 18, 2019 5:55 AM

All replies

  • Hi ymanoj.yadav,

    Welcome to MSDN forum.

    Since our forum is discussing about unit test, we recommend you could redirect to Boost C++ libraries forum for better support.

    Thank you for understanding.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Friday, July 19, 2019 2:16 AM