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.
随机推荐
- 浅谈算法和数据结构: 十 平衡查找树之B树
前面讲解了平衡查找树中的2-3树以及其实现红黑树.2-3树种,一个节点最多有2个key,而红黑树则使用染色的方式来标识这两个key. 维基百科对B树的定义为“在计算机科学中,B树(B-tree)是一种 ...
- Functional Programming without Lambda - Part 2 Lifting, Functor, Monad
Lifting Now, let's review map from another perspective. map :: (T -> R) -> [T] -> [R] accep ...
- Jenkins的Windows Slave分布式构建和部署
1.新建的Slave:系统管理-->管理节点-->新建节点 远程工作目录 即是 节点服务器 站点文件存放目录 在配置节点时 启动方法 配置的选项中的 Launch agent via Ja ...
- eCharts动态加载各省份的数据
假如从数据库读出以下数据,如何将数据展示在地图之上 1.部门的名称数据: List deptname=[联通事业部-上海联通项目组, 联通事业部-河南联通项目组, 联通事业部-贵州联通项目组, 联通事 ...
- OpenCascade B-Spline Basis Function
OpenCascade B-Spline Basis Function eryar@163.com Abstract. B-splines are quite a bit more flexible ...
- 【转】C# using的三种使用方法
原文地址http://www.cnblogs.com/fashui/archive/2011/09/29/2195061.html,感谢心茶前辈的总结. 1.using指令 using+命名空间,这种 ...
- Python标准模块--linecache
1.模块简介 linecache主要用于缓存文件内容,如果下次继续读取该文件,则不需要打开文件,直接在缓存中获取该文件内容. 2.模块使用 模块的基本方法有getline,clearcache,get ...
- 使用jQuery封装实用函数
一.引言 项目开发中,前端会有一个辅助工具类的js文件,比如cookie的操作,团队成员自己封装的方法.大多数时候,我们开发人员自己都是写一个全局函数,不考虑后期维护人员也会写相同的代码,然后造成代码 ...
- 关于Repository、IUnitOfWork 在领域层和应用服务层之间的代码分布与实现
本来早就准备总结一下关于Repository.IUnitOfWork之间的联系以及在各层中的分布,直到看到田园里的蟋蟀发表的文章:<DDD 领域驱动设计-谈谈 Repository.IUnitO ...
- 构建自己的PHP框架--构建缓存组件(1)
作为一个框架,我们还没有相应的缓存组件,下面我们就来构建我们的缓存组件. 先来定义一下接口,在 src 文件夹下创建 cache 文件夹,在cache文件夹下创建 CacheInterface.php ...