对于如下程序:

#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp> using namespace std; int main()
{
boost::asio::io_service io;
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5)); t.wait(); cout << "Hello World!\n" << endl; return 0;
}

在Visual Studio 2010下编译出现如下错误:

1>LINK : fatal error LNK1104: cannot open file 'libboost_system-vc100-mt-gd-1_54.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:36.95
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

解决方法如下:

1.首先运行D:\boost_1_54_0目录下的bootstrap.bat文件。此时在该目录下生成文件b2.ext

2.执行b2.exe文件,在当前目录下生成/stage/lib

3.把生成的lib文件加入到工程文件中即可。

参考:http://blog.sina.com.cn/s/blog_7195909a01018vzz.html

编译boost程序出现如下错误fatal error LNK1104: cannot open file 'libboost_system-vc100-mt-gd-1_54.lib'的解决方法的更多相关文章

  1. 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 ...

  2. VC++ 链接错误LINK : fatal error LNK1104: cannot open file "*.lib"

    问题描述: 运行VC++编译时经常出现 Linking… LINK : fatal error LNK1104: cannot open file “*.lib” Error executing li ...

  3. 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 ...

  4. LINK : fatal error LNK1104: cannot open file "mfc42d.lib"

    VC++6.0上建立了个基于MFC应用程序,在编译时候没出现错误,但在LINK的是时候出现这样的错误:Linking...LINK : fatal error LNK1104: cannot open ...

  5. LINK : fatal error LNK1104: cannot open file的解决方法

    结果是编译时通过了,但连接(F7)时却显示: LINK : fatal error LNK1104: cannot open file“Debug/1.exe” ============== 上一次运 ...

  6. BUG:给Nexus7编译Android4.2的时候出现 fatal error: map: No such file or directory

    情况是这样的,某人最近入手一台nexus7,于是在cyanogenmod 将nexus7的原代码下载到本地,编译环境是UBUNTU 12,04 然后编译的时候,出现了如下的错误导致编译失败 <p ...

  7. MySQL5.7报错[ERROR] Unix socket lock file is empty /tmp/mysql.sock.lock的解决方法

    发现MySQL服务器因系统磁盘写满导致服务停了,清理磁盘后启动服务时无法正常启动,查看localhost.err日志发现如下报错: [ERROR] Unix socket lock file is e ...

  8. 链接程序的时候遇到问题:fatal error LNK1104: cannot open file 'rctrl-d.lib'

    1.lib库文件没有添加到工程中(工程里面根本就没有这个文件) 2.

  9. 启动pip时,< Fatal error in launcher: Unable to create process using '"' >问题的原因及解决方法

    根本原因 要启动的pip程序,中指定的python程序路径不对 实例分析 我的window电脑上同时安装了python2.7和python3.6,他们的安装路径如下图: 注意图python2.7中红线 ...

随机推荐

  1. JVM Client Server启动设置

    看看你下面的这两个文件,是不是尺寸差别很大?%JAVA_HOME%/jre/bin/client/jvm.dll%JAVA_HOME%/jre/bin/server/jvm.dll   Jvm动态库有 ...

  2. 常用sqoop操作

    1. 关系型数据库到hive sqoop import --connect jdbc:mysql://localhost:3306/datahouse --username datahs --pass ...

  3. eclipse中maven打包

    第一种方式:将依赖包打包进一个jar包中. <build> <plugins> <plugin> <artifactId>maven-compiler- ...

  4. kafka+storm+hbase

    kafka+storm+hbase实现计算WordCount. (1)表名:wc (2)列族:result (3)RowKey:word (4)Field:count 1.解决: (1)第一步:首先准 ...

  5. [转自setting]神奇的jQuery

    前言 之前的项目也一直都是在用jQuery,遇到问题就翻翻API,也从来没有进行过比较系统的总结和整理.最近由于要做个培训,因为比较系统的归纳了一下javascript的相关知识,顺手做个笔记.说到j ...

  6. JQuery _ 定时器(jQuery Timers) 学习

    jQuery Timers插件地址: http://plugins.jquery.com/project/timers JQuery Timers应用知识 提供了三个函式 1. everyTime(时 ...

  7. C++ GDI+调用

    封装了一个GDI+的使用类 GdiPluss.h #pragma once #include <comdef.h> #include <gdiplus.h> using nam ...

  8. e643. 以匿名类处理事件

    If an event handler is specific to a component (that is, not shared by other components), there is n ...

  9. 类的数据成员加前缀 m_(表示 member)

    类的数据成员加前缀 m_(表示 member),这样可以避免数据成员与 成员函数的参数同名. 例如: void Object::SetValue(int width, int height) { m_ ...

  10. 监视在input框中按下回车(enter) js实现

    function getKey(event) { if (event.keyCode == 13) { alert("我是回车键"); } } <input type=&qu ...