I've already built the Boost libraries. But I need to add somehow C:\boost_1_60_0 to the compiler include paths; I'm using VS 2015. I also need to add another directory path to the linker library path as shown below:
1 file(s) copied.
...updated 3 targets...
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
C:\boost_1_60_0
The following directory should be added to linker library paths:
C:\boost_1_60_0\stage\lib
C:\boost_1_60_0>
I've tried gcc I-C:\boost_1_60_0 for the compiler path and -L C:\boost_1_60_0\stage\lib for the linker but to know avail. I've tried variations as well.
Am I missing something? Any help will be greatly appreciated. Perhaps this is way I'm getting an error in VS when I try to run a little program:
#include "stdafx.h"
#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
usingnamespace std;
int main()
{
typedef std::istream_iterator<int> in;
cout << "Type in any number: ";
for_each(
in(std::cin), in(), std::cout
<< (boost::lambda::_1 * 10)
<< "\nType in another number: ");
return 0;
}
The error in question is "cannot open include file C:/Lib/boost/lambda/lambda.hpp: no such file or directory", which doesn't make sense because I've already ascertained the existence of this file.
gcc is a command line tool that accepts a number of input parameters.
For your purposes, the important input parameters here are:
The include directories, each of which is prefixed -I
The link directories, each of which is prefixed -L
The link libraries, each of which is prefixed -l (that's a lower case L)
The actual input source files to build
So if you just typed gcc -IC:\boost_1_60_0 then you left out:
The link directories
The link libraries
The actual input source file to build
Given that you want to code in C++, you might find that g++ is to be used, rather than gcc (which, by default, is a C compiler).