简体   繁体   English

VS2015 的 Boost nuget 包

[英]Boost nuget package for VS2015

It fails with它失败了

1>\\solutions\\packages\\boost_thread.1.58.0.0\\lib\\native\\src\\win32\\thread.cpp(1007): error C2491: 'boost::on_process_enter': definition of dllimport function not allowed 1>\\solutions\\packages\\boost_thread.1.58.0.0\\lib\\native\\src\\win32\\thread.cpp(1007): error C2491: 'boost::on_process_enter': dllimport 函数的定义不允许

Did I miss something or something went broken in boost (or nuget package) for VS2015?我是否错过了 VS2015 的 boost(或 nuget 包)中的某些东西或某些东西损坏了?

It's better to use precompiled packages instead of source packages.最好使用预编译包而不是源包。 For example https://www.nuget.org/packages/boost_thread-vc140/1.59.0例如https://www.nuget.org/packages/boost_thread-vc140/1.59.0

Previous definition of BOOST_ALL_DYN_LINK (in property sheet) interfered with the nuget package which (apparently) links statically BOOST_ALL_DYN_LINK 的先前定义(在属性表中)干扰了(显然)静态链接的 nuget 包

2020 update: just switch to vcpkg , really 2020 年更新:只需切换到vcpkg ,真的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM