AudioDroid
AudioDroid

Reputation: 2322

Run boost library with borland compiler 5.82

I am trying to run the "getting started" example:

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

after downloading the boost library to my machine. But I can't get it running. After googling, all I found is to add:

#define BOOST_REGEX_USE_VCL
#define BOOST_NO_OPERATORS_IN_NAMESPACE
#define BOOST_NO_STD_LOCALE

That still didn't help. The error is:

[C++ Error] lambda_traits.hpp(435): E2238 Multiple declaration for 'bind_traits<R>'
[C++ Error] lambda_traits.hpp(389): E2344 Earlier declaration of 'bind_traits<R>'

Anybody any (further) ideas? As stated in the headline I'm running with the 5.82 version of the Borland compiler.

Oh...and please don't suggest to use another compiler. I'm at work, and I'm not my own boss. :-/

;-)

Upvotes: 1

Views: 804

Answers (1)

Roddy
Roddy

Reputation: 68033

I think boost::lambda doesn't work with 5.8.2 - It may not even work with the very latest C++Builder compiler.

Have a look at the results on the bcbboost pages, and keep an eye on David Dean's blog.

Upvotes: 1

Related Questions