none
BOOST Library compilation RRS feed

  • Question

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

    I was trying to compile this code using the below command.

    c++ -I /export/IPS/thirdpartylibs Example1.cpp -o EXAMPLE

    Getting the below error:

    Example1.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory
    Example1.cpp: In function ‘int main()’:
    Example1.cpp:8: error: ‘boost’ has not been declared
    Example1.cpp:8: error: ‘lambda’ is not a namespace-name
    Example1.cpp:8: error: expected namespace-name before ‘;’ token
    Example1.cpp:12: error: ‘_1’ was not declared in this scope

    anyone can help me to resolve the error.

    Regards

    Ranjith

    • Moved by Jesse Jiang Tuesday, January 15, 2013 7:52 AM
    Wednesday, January 2, 2013 7:44 AM

All replies