Error LNK1104 cannot open file 'libboost_system-vc140-mt-gd-1_58.lib'
I had a similar problem when trying to use boost unit testing in Visual Studio 2015 (Community Edition):
fatal error LNK1104: libboost_unit_test_framework-vc140-mt-1_57
so I thought I'd share my solution.
You can create a boost unit testing project in of of two ways (and this solution works for both):
- using the Boost Unit Test Adapter
- or by creating a Win32 Console Application (steps here), and substituting the main function with a boost unit testing function (steps here).
Here are the steps I followed to get both projects to work:
First, download the desired boost version (for example, boost_1_57_0). You can either download boost with the correct binaries (compiled using msvc v140), or extract the binaries yourself by running the following commands from command line:
- bootstrap.bat
- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
- bjam --clean
- bjam -j4 --debug-symbols=on --build-type=complete toolset=msvc-14.0 threading=multi runtime-link=shared address-model=32
Where msvc-14.0 specifies that we require the Visual Studio 2015 version (VS 2015 = v14.0 = v140), and address-model=32 specifies that we require platform 32 (but the same can be done for 64 bit).
Once you have the binaries, go to Visual Studio, select the Boost Unit Testing project you have created. Go to Project properties > configuration (from the main menu) and make the following choices:
Set the "General > Platform Toolset" to Visual Studio 2015 (v140).
Include the path to the boost folder (e.g. C:\boost_1_57_0) and the path to the subfolder containing the binary files (e.g. C:\boost_1_57_0\stage\lib) in:
- "C\C++ > Additional Include Directory"
- and "Linker > Additional Library Directories".
参考链接:
Error LNK1104 cannot open file 'libboost_system-vc140-mt-gd-1_58.lib'的更多相关文章
- VS2008 LINK : fatal error LNK1104: cannot open file 'atls.lib'错误解决方案
用VS 2008编写ATL的64位应用程序时,提示链接错误:VS2008 LINK : fatal error LNK1104: cannot open file 'atls.lib' 问题原因 VS ...
- VC++ 链接错误LINK : fatal error LNK1104: cannot open file "*.lib"
问题描述: 运行VC++编译时经常出现 Linking… LINK : fatal error LNK1104: cannot open file “*.lib” Error executing li ...
- 编译boost程序出现如下错误fatal error LNK1104: cannot open file 'libboost_system-vc100-mt-gd-1_54.lib'的解决方法
对于如下程序: #include <iostream> #include <boost/asio.hpp> #include <boost/date_time/posix ...
- LINK : fatal error LNK1104: cannot open file "mfc42d.lib"
VC++6.0上建立了个基于MFC应用程序,在编译时候没出现错误,但在LINK的是时候出现这样的错误:Linking...LINK : fatal error LNK1104: cannot open ...
- LINK : fatal error LNK1104: cannot open file的解决方法
结果是编译时通过了,但连接(F7)时却显示: LINK : fatal error LNK1104: cannot open file“Debug/1.exe” ============== 上一次运 ...
- VS2008链接错误fatal error LNK1104: cannot open file '*.obj'
This particular issue is caused by specifying a dependency to a lib file that had spaces in its path ...
- DLL项目报错:fatal error lnk1104: cannot open file "...\xxx.dll"
在生成DLL的时候报这个错, 生成不了DLL 检查生成DLL的路径是否有其他程序在使用... 或者把杀毒软件关了试试...
- LINK : fatal error LNK1104: cannot open file .exe' 重开application Experience 服务即可
这是一个坑, , 答案五花八门这个解决了我的痛点. 就这样了.
- 链接程序的时候遇到问题:fatal error LNK1104: cannot open file 'rctrl-d.lib'
1.lib库文件没有添加到工程中(工程里面根本就没有这个文件) 2.
随机推荐
- .NET 基础 一步步 一幕幕 [注释、命名规则、访问修饰符、数据类型、常量、变量]
注释.命名规则.访问修饰符.数据类型.常量.变量 话说一个不会写注释的程序猿的不是一个好吃货,我们本篇就从注释开始说起好了. 在C#中有三种注释: 第一种:单行注释 以//开头,后面的就是注释内容 ...
- C# BS消息推送 SignalR Hubs环境搭建与开发(二)
1. 前言 本文是根据网上前人的总结得出的. 环境: SignalR2.x,VS2015,Win10 2. 开始开发 1)新建一个MVC项目,叫做SignalRDemo 2)安装SignalR包 In ...
- 《超实用的JavaScript代码段》—— 读后总结
这本书全是代码,从头到尾跟着坐下来确实收获很多.比那些古板的教科书式的理解更多,不过书中并不是每个例子都做了,有的作者封装的太多,觉得看了收获不多,就没细看——比如模块渐变.有空好好学学这段的代码. ...
- Android开发学习之路-指纹识别api
在android6.0之后谷歌对指纹识别进行了官方支持,今天还在放假,所以就随意尝试了一下这个api,但是遇到了各种各样的问题 ①在使用FingerPrintManager这个类实现的时候发现了很多问 ...
- Atitit 设计模式的本质思考】
Atitit 设计模式的本质思考] 1. 世界就是有模式构建的1 1.1. 多次模式与偶然模式1 1.2. 模式就是在一种场合下对某个问题的一个解决方案."1 1.3. 模式需要三样东西. ...
- SQL 2014 AlwaysOn 搭建
AlwaysOn底层依然采用Windows 故障转移群集的机制进行监测和转移,因此也需要先建立Windows Cluster,只不过可用性组中的数据库不一定非要再存放在共享存储上了.可以是存储在本地磁 ...
- iOS-在团队开发过程中控制代码版本
Cornerstone Svn简单使用指南: -- what if 负责编写 一.安装并拷贝项目 1.第一步:安装svn.2.第二步:第一个使用svn,找到“Check Out Working Cop ...
- Web API接口之FileReader
Web API接口之FileReader *:first-child { margin-top: 0 !important; } body>*:last-child { margin-botto ...
- Web APi之过滤器创建过程原理解析【一】(十)
前言 Web API的简单流程就是从请求到执行到Action并最终作出响应,但是在这个过程有一把[筛子],那就是过滤器Filter,在从请求到Action这整个流程中使用Filter来进行相应的处理从 ...
- Objective-C中的内存管理
在编程语言中是少不了对内存的管理的,内存对于计算机来说是宝贵的资源,所以对使用不到的资源进行回收是很有必要的.OC中使用引用计数和垃圾回收来管理内存,在OC中为每个对象分配一个引用计数器,当对象刚刚被 ...