0

When I tried to build my project with Boost library iostreams using Clang on Windows without using CMake, I get bunch of link errors. When I'm using Boost auto link I get error that the linker can't open file boost_iostreams-clangw15-mt-x64-1_81.lib, which doesn't exist. When I disable the Boost auto link using the BOOST_ALL_NO_LIB definition and try to link to the existing boost_iostreams-clang15-mt-x64-1_81.lib lib file manually, I get bunch of unresolved external symbol errors.

I tried to ask ChatGPT what does the w character before the compiler name in lib file name stands for. He doesn't seem to know either. First he suggested that the w character stand for wide character support and I need to build the Boost libraries with ICU (International Components for Unicode) library. Then he suggested that the w character stands for Windows MSVC 2017. Any ideas how could I fix this issue?

This is the command I used for generating Boost library iostreams:

b2 --toolset=clang --with-iostreams

xarxarx
  • 21
  • 5
  • Without using CMake, then use what VS? – kiner_shah Mar 17 '23 at 11:38
  • I'm using VS code – xarxarx Mar 17 '23 at 11:41
  • 1
    `clangw` is clang for windows: https://github.com/boostorg/config/blob/develop/include/boost/config/auto_link.hpp#L223. Where did you get your boost build from? – Alan Birtles Mar 17 '23 at 11:43
  • From the official download page https://www.boost.org/users/download/. – xarxarx Mar 17 '23 at 11:45
  • but that only contains source releases and msvc builds? – Alan Birtles Mar 17 '23 at 11:56
  • From where should i download the Boost library for Clangw? With the Boost library distribution I downloaded I managed to build Boost lib files, but without the w character in front of the compiler name (in my case Clang). I just need to build the libraries with w character in front of the compiler name or tell the Boost auto link to stop using the lib files with the w character. – xarxarx Mar 17 '23 at 12:03

1 Answers1

0

I finally got it working.

This is the updated command I used for generating Boost library iostreams:

b2 --layout=versioned --build-type=complete --with-iostreams -s ZLIB_SOURCE=%PATH_TO_ZLIB% --toolset=clang-win --variant=release

xarxarx
  • 21
  • 5