I recently started using the Boost Library and I am having problems with installing it.
What I did so far was:
- Download the lib , extracting it to "C:/Boost" Directory.
- Entering the Visual Studio 2012 CMD + did "cd C:/Boost/boost1_56_0".
- Typing the bootstrap.bat command and afterwards the b2 command.
- Entered Visual and added in the C/C++ General -> Additional Include Directories the directory of the boost root lib that I extracted earlier.
- In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled Headers
In that project I made a main.cpp
file that contains:
#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) << " " );
}
For some reason, and I don't have a clue any more, I get these errors:
- LNK2019 - unresolved external symbol _WinMain@16 referenced in function __tmainCRTStartup
- LNK1120 - 1 unresolved externals
I tried toying with the configurations and the commands from few places from the internet with no result. Why could this be happening?