First Boost Program

I tried to write my first Boost program from information on the Boost libraries website. Here is the code:

#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) << " " );
}

He shows me this error:

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 ==========

How can I fix this error?

+3
source share
4 answers

The communication error you receive means that your program is not associated with the appropriate libraries. Since the error relates to the Microsoft system library ( kernel.lib), you need to make sure that your system is configured correctly. This is not a Boost problem as such, although Boost may be interested in doing so kernel.lib.

+1
source

The answer to a similar question outside of SO :

SDK Windows

( )

+5

, Windows SDK.

+2

Visual, , kernel32.lib wouln'd . , C:/Program Files (x86)/MS Visual Studio/VC/lib

, - . lib, ';'. , [...], .

0

Source: https://habr.com/ru/post/1760737/


All Articles