c++ - First Boost 计划

标签 c++ visual-studio boost

我尝试根据 Boost 库站点上的信息编写我的第一个 Boost 程序。 这是代码:

#include <boost/lambda/lambda.hpp>

#include <iostream>
#include <iterator>
#include <algorithm>

int main()
{
    using namespace boost::lambda;
    typedef std::istream_iterator<int> in;

    std::for_each(
        in(std::cin), in(), std::cout << (_1 * 3) << " " );
}

它向我显示了这个错误:

1>------ Build started: Project: boost_librarys, Configuration: Debug Win32 ------
1>  boost_librarys.cpp
1>LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

如何修复这个错误?

最佳答案

similiar question outside SO 的答案是:

Download and install the Windows SDK from here

(引用中的链接可能不适合您的系统)

关于c++ - First Boost 计划,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3530899/

相关文章:

C++ - 为什么编译器不能推断出包含构造函数参数的函数模板的类型?

C++ 复制构造函数调用对象切片

visual-studio - Visual Studio : exclude outlining from undo/redo stack

c++ - 成员初始化列表 vs 赋值/复制构造函数(在 boost deadline_timer 中)

c++ - 如何将 boost::optional 设置回未初始化状态?

c++ - 虚拟机上的opencv视频捕获和摄像头访问

c++ - 如何将 C++ 关键字 "this"与成员函数 "operator="一起使用?

windows - 如何自动化此 VB 脚本?

c# - 这是定期异步下载的好代码吗?

c++ - 为什么 boost 的 managed_mapped_file::shrink_to_fit 在 Windows 和 Linux 上表现不同?