May I have two variants of Boost build with MSVC and MinGW in one folder?

94 Views Asked by At

If I build one of them then all is working well but if together then proplems begin. CMake types for each component which I want to link like that:

CMake Error at D:/Boost/lib/cmake/boost_program_options-1.78.0/libboost_program_options-variant-vc143-mt-gd-x64-1_78-static.cmake:87 (message):
  Target Boost::program_options already has an imported location
  'D:/Boost/lib/libboost_program_options-mgw8-mt-d-x64-1_78.a', which is
  being overwritten with
  'D:/Boost/lib/libboost_program_options-vc143-mt-gd-x64-1_78.lib'
  1. Boost build for MinGW using Qt enviroment:

bootstrap gcc

b2 --build-type=complete toolset=gcc variant=debug address-model=64 link=static --prefix="D:\Boost" install

  1. MSVC with Native Tools Command Prompt VS 2022:

bootstrap

b2 --build-type=complete variant=debug address-model=64 link=static --prefix="D:\Boost" install

Using Windows 10, CMake 3.21.1.

Where and what do I mistake with? Will be glad if you help me. Thanks.

0

There are 0 best solutions below