Open yuriy-mochurad opened 3 years ago
Sorry for the late reply. Are you still facing this issue?
We have a CI pipeline setup for MSVC2019. I just checked the logs and found the last successful build was using boost 1.73. https://dev.azure.com/mohinda/ni-media/_build/results?buildId=43&view=logs&j=1b5c89fe-70ad-5a27-3200-cdc893585c2c&t=41ca7c80-71a7-5b26-c919-de1799c177ab. The code hasn't changed since then so I would expect this combination to still work.
I just built HEAD locally using VCPKG on Windows with CMake 3.17.0, MSVC2019, boost 1.75.0 and I didn't face any build errors. Could you try using VCPKG? Building boost manually can be error prone, maybe the b2 configuration didn't match the projects compiler settings (MD/MT ... )?
Can not build tests in following setup:
Build log looks like:
Build log with not able to find boost library
``` C:\tmp\ni-media\build>cmake --build . --config Release Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Checking Build System Building Custom Rule C:/tmp/ni-media/audiostream/CMakeLists.txt iotools.cpp stream_info.cpp istream.cpp ostream.cpp ivectorstream.cpp ifstream.cpp ofstream.cpp ifvectorstream.cpp fstream_info.cpp ifstream_info.cpp ofstream_info.cpp aiff_ofstream.cpp wav_ofstream.cpp Generating Code... audiostream.vcxproj -> C:\tmp\ni-media\build\audiostream\Release\audiostream.lib Building Custom Rule C:/tmp/ni-media/audiostream/test/CMakeLists.txt gtest_main.cpp test_helper.cpp source_test.cpp stream_buffer.test.cpp istream_read_signed_integer.test.cpp istream_read_unsigned_integer.test.cpp istream_read_floating_point.test.cpp ifstream.test.cpp ifstream_robustness.test.cpp ifvectorstream.test.cpp ivectorstream.test.cpp ofstream.test.cpp aiff_ifstream_info.test.cpp aiff_source.test.cpp aiff_sink.test.cpp wav_ifstream_info.test.cpp wav_source.test.cpp wav_ofstream_info.test.cpp wav_sink.test.cpp Generating Code... LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc142-mt-x64-1_74.lib' [C:\tmp\ni-media\build\audiostream\test\audiostre am_test.vcxproj] Building Custom Rule C:/tmp/ni-media/audiostream/test/CMakeLists.txt generator.cpp LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc142-mt-x64-1_74.lib' [C:\tmp\ni-media\build\audiostream\test\gene rator.vcxproj] Building Custom Rule C:/tmp/ni-media/pcm/test/CMakeLists.txt ```When I explicitly add that lib to link paths I get:
Build log with extra link path
``` C:\tmp\ni-media\build>cmake --build . --config Release Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework Copyright (C) Microsoft Corporation. All rights reserved. Checking Build System Building Custom Rule C:/tmp/ni-media/audiostream/CMakeLists.txt iotools.cpp stream_info.cpp istream.cpp ostream.cpp ivectorstream.cpp ifstream.cpp ofstream.cpp ifvectorstream.cpp fstream_info.cpp ifstream_info.cpp ofstream_info.cpp aiff_ofstream.cpp wav_ofstream.cpp Generating Code... audiostream.vcxproj -> C:\tmp\ni-media\build\audiostream\Release\audiostream.lib Building Custom Rule C:/tmp/ni-media/audiostream/test/CMakeLists.txt gtest_main.cpp test_helper.cpp source_test.cpp stream_buffer.test.cpp istream_read_signed_integer.test.cpp istream_read_unsigned_integer.test.cpp istream_read_floating_point.test.cpp ifstream.test.cpp ifstream_robustness.test.cpp ifvectorstream.test.cpp ivectorstream.test.cpp ofstream.test.cpp aiff_ifstream_info.test.cpp aiff_source.test.cpp aiff_sink.test.cpp wav_ifstream_info.test.cpp wav_source.test.cpp wav_ofstream_info.test.cpp wav_sink.test.cpp Generating Code... audiostream_test.vcxproj -> C:\tmp\ni-media\build\audiostream\test\Release\audiostream_test.exe Building Custom Rule C:/tmp/ni-media/audiostream/test/CMakeLists.txt generator.cpp libboost_program_options-vc142-mt-x64-1_74.lib(value_semantic.obj) : error LNK2005: "public: __cdecl boost::program_options::error_with_op tion_name::error_with_option_name(class std::basic_stringAm I doing something wrong here?
P.S.: I also tried to add all dependencies through conan, that ensures that all libraries are being linked but got same result.