Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
2>;链接:致命错误LNK1104:无法打开文件';libboost_文件系统-vc120-mt-sgd-1_58.lib';_Boost_Cmake_Msvc12 - Fatal编程技术网

2>;链接:致命错误LNK1104:无法打开文件';libboost_文件系统-vc120-mt-sgd-1_58.lib';

2>;链接:致命错误LNK1104:无法打开文件';libboost_文件系统-vc120-mt-sgd-1_58.lib';,boost,cmake,msvc12,Boost,Cmake,Msvc12,难怪中没有这样的文件..\boost\u 1\u 58\u 0\stage\lib。我怎样才能得到一个?我只有: boost_1_58_0\stage\lib\libboost_filesystem-vc120-mt-s-1_58.lib boost_1_58_0\stage\lib\libboost_filesystem-vc120-s-1_58.lib 在那里。尝试使用各种选项编译boost,最后将--build type=complete添加到它(“穷人”的解决方案),以获得: 我正在导

难怪
中没有这样的文件..\boost\u 1\u 58\u 0\stage\lib
。我怎样才能得到一个?我只有:

boost_1_58_0\stage\lib\libboost_filesystem-vc120-mt-s-1_58.lib
boost_1_58_0\stage\lib\libboost_filesystem-vc120-s-1_58.lib
在那里。尝试使用各种选项编译boost,最后将
--build type=complete
添加到它(“穷人”的解决方案),以获得:

我正在导入的项目自述文件中建议的命令行仍然没有乐趣。这是一个CMake项目,我费了好大劲才为它构建了MSVS解决方案

注意:当仔细查看CMake gui时,我的问题得到了解决:


我意识到是调试配置没有生成,当我右键单击“解决方案”>configuration Manager>更改为发布版本时,一切正常。问题仍然存在-如何获取那些libboost_filesystem-vc120-mt-sgd-1_58.lib构建?

您需要在b2命令行参数中设置
运行时链接=静态运行时调试=on variant=debug
,才能获取
sgd

从关于Windows上的库命名(特别是ABI标记部分):

ABI标记:对影响库与其他编译代码的互操作性的细节进行编码。对于每个这样的功能,标签上都会添加一个字母:

Key  |  Use this library when:                                |  Boost.Build option
=====================================================================================
 s   |  linking statically to the C++ standard library and    |  runtime-link=static
     |  compiler runtime support libraries.                   | 
-------------------------------------------------------------------------------------
 g   |  using debug versions of the standard and runtime      |  runtime-debugging=on
     |  support libraries.                                    |
-------------------------------------------------------------------------------------
 y   |  using a special debug build of Python.                |  python-debugging=on
-------------------------------------------------------------------------------------
 d   |  building a debug version of your code.                |  variant=debug
-------------------------------------------------------------------------------------
 p   |  using the STLPort standard library rather than the    |  stdlib=stlport
     |  default one supplied with your compiler.              |

哇,谢谢-是不是只有
variant=release
variant=debug
才有?换句话说,只要在上面的命令行中添加
runtime debug=on variant=debug
就足够了(我已经有了
runtime link=static
),我认为如果您将
variant
全部删除,它将默认构建debug和release。我还认为(不确定)它在构建调试版本时默认选择
runtime debug=on
。基本上,试着在不使用
variant
标志的情况下运行原始命令。删除
variant
并确保
C:\\uboost\u 1\u 58\u 0\stage\lib\libboost\u filesystem-vc120-mt-sgd-1\u 58.lib C:\\uboost\u 1\u 0\stage\libboost\u filesystem-vc120-sgd-1\u 58.lib添加了(比其他变体大4倍)-关闭:)Hi,如何在visual studio 2013属性中设置这些命令参数?这些选项是否存在于从命令行运行之外?
Key  |  Use this library when:                                |  Boost.Build option
=====================================================================================
 s   |  linking statically to the C++ standard library and    |  runtime-link=static
     |  compiler runtime support libraries.                   | 
-------------------------------------------------------------------------------------
 g   |  using debug versions of the standard and runtime      |  runtime-debugging=on
     |  support libraries.                                    |
-------------------------------------------------------------------------------------
 y   |  using a special debug build of Python.                |  python-debugging=on
-------------------------------------------------------------------------------------
 d   |  building a debug version of your code.                |  variant=debug
-------------------------------------------------------------------------------------
 p   |  using the STLPort standard library rather than the    |  stdlib=stlport
     |  default one supplied with your compiler.              |