admin管理员组文章数量:1236699
I've compiled the Boost 1.87 libraries using the Intel OneAPI DPC++ compiler 2025.0.4. I followed the instructions given here for Windows. My project-config.jam file (which is created by running bootstrap.bat) has the following line added:
using clang-win : 2025.0.4.20241205 : "C:/Program Files (x86)/Intel/oneAPI/compiler/2025.0/bin/compiler/clang-cl.exe" ;
The command I use to build the Boost libraries is:
b2 install --without-python --without-graph_parallel --without-mpi --build-type=complete toolset=clang-win link=shared address-model=64 architecture=x86 runtime-link=shared
The static libraries produced follow the Boost library naming convention described here which includes the toolset tag. For example, the JSON library file produced using the above procedure has the filename: boost_json-clangw2025-mt-x64-1_87.lib
In Visual Studio 2022, I add the location of the Boost .hpp source files to the DPC++ project properties under Configuration Properties > VC++ Directories > External Include Directories and reference them in the source code:
#include <boost\json.hpp>
#include <boost\json\src.hpp>
Under Configuration Properties > Linker > General > Additional Library Directories I add the path to the static library files.
When I build my DPC++ console application project in Visual Studio, I get a LNK1104 error with the message "cannot open file 'libboost_json-clangw19-mt-x64-1_87.lib'". The linker appears to be looking for a file that has a "lib" prefix and "clangw19" toolset tag in the filename. If I rename the library file I created earlier to libboost_json-clangw19-mt-x64-1_87.lib, the program compiles with no errors and works as expected.
Is there a way to build the Boost libraries with the filenames the way that the program linking to these library files is looking for (libboost_json-clangw19-mt-x64-1_87.lib)? Perhaps something that needs to be set in the .jam files when building the Boost libraries? Even better, is there a way to have the linking look for the libraries with the names as produced (boost_json-clangw2025-mt-x64-1_87.lib)?
本文标签: clangToolset tag in filenames of Boost static libraries compiled with Intel OneAPI DPCStack Overflow
版权声明:本文标题:clang - Toolset tag in filenames of Boost static libraries compiled with Intel OneAPI DPC++ - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739486610a2165388.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论