|
Boost Users : |
From: 7stud (bbxx789_05ss_at_[hidden])
Date: 2008-04-19 23:35:27
I'm trying to install boost on mac osx 10.4.7. I followed
the tutorial "Getting Started on Unix Variants" found here:
http://www.boost.org/doc/libs/1_35_0/
more/getting_started/unix-variants.html
Following the instructions in the tutorial, I installed
boost in /usr/local as instructed, so my directory
structure is:
/usr/local/boost_1_34_1/boost
But when I run the first example in the tutorial:
#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 get the error(among others):
error: boost/lambda/lambda.hpp: No such file or directory
If I change the include path to:
#include </user/local/boost_1_34_1/boost/lambda/lambda.hpp>
I get the error(among others):
error: boost/lambda/core.hpp: No such file or directory
But core.hpp is in the lambda directory:
/usr/local/boost_1_34_1/boost/lambda$ ls
algorithm.hpp control_structures.hpp lambda.hpp
bind.hpp core.hpp loops.hpp
casts.hpp detail numeric.hpp
closures.hpp exceptions.hpp switch.hpp
construct.hpp if.hpp
I'm using the Xcode 2.4 IDE to run my C++ programs.
I also tried to execute the program from the command line with
the original include path:
#include <boost/lambda/lambda.hpp>
but I get the same error:
~/2testing/dir1$ g++ prog1.cpp
prog1.cpp:1:35: error: boost/lambda/lambda.hpp:
No such file or directory
prog1.cpp: In function 'int main()':
prog1.cpp:8: error: 'boost' has not been declared
prog1.cpp:8: error: expected namespace-name before ';' token
prog1.cpp:8: error: '<type error>' is not a namespace
prog1.cpp:11: error: '_1' was not declared in this scope
I get the same errors again with the full include path:
#include </user/local/boost_1_34_1/boost/lambda/lambda.hpp>
$ g++ prog1.cpp
In file included from prog1.cpp:1:
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:14:33:
error: boost/lambda/core.hpp: No such file or directory
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:21:52:
error: boost/lambda/detail/operator_actions.hpp:
No such file or directory
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:22:61:
error: boost/lambda/detail/operator_lambda_func_base.hpp:
No such file or directory
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:23:63:
error: boost/lambda/detail/operator_return_type_traits.hpp:
No such file or directory
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:26:45:
error: boost/lambda/detail/operators.hpp:
No such file or directory
/usr/local/boost_1_34_1/boost/lambda/lambda.hpp:30:46:
error: boost/lambda/detail/member_ptr.hpp:
No such file or directory
prog1.cpp: In function 'int main()':
prog1.cpp:8: error: 'boost' has not been declared
prog1.cpp:8: error: expected namespace-name before ';' token
prog1.cpp:8: error: '<type error>' is not a namespace
prog1.cpp:11: error: '_1' was not declared in this scope
What path should I be using? Or, should I set an environment variable somewhere?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net