newbie: installation question

Hi folks I just started with boost and have run into the first problem: the example program (see http://www.boost.org/doc/libs/1_46_0/more/getting_started/unix-variants.html) does not run though everything should be in place: The error is 'example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory" yes, I did check my file structure (see attached extract from Terminal). Installation of boost was done via sudo port... Anyone an idea what the issue might be? Thx GS User:~ SUserHG$ ls Desktop Downloads Library Music Public QuantLib-1.0.1.tar.gz example.cpp Documents Install-QuantLib.txt Movies Pictures QuantLib-1.0.1 Sites SUser:~ SUserHG$ cd /opt/local/include/boost/lambda SUser:lambda SUserHG$ ls algorithm.hpp casts.hpp construct.hpp core.hpp exceptions.hpp lambda.hpp numeric.hpp bind.hpp closures.hpp control_structures.hpp detail if.hpp loops.hpp switch.hpp SUser:lambda SUserHG$ cd SUser:~ SUserHG$ c++ -I /opt/local/include/boost example.cpp -o example example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory example.cpp: In function ‘int main()’: example.cpp:8: error: ‘boost’ has not been declared example.cpp:8: error: ‘lambda’ is not a namespace-name example.cpp:8: error: expected namespace-name before ‘;’ token example.cpp:12: error: ‘_1’ was not declared in this scope

Hi Gunnar,
On Fri, Mar 4, 2011 at 6:57 AM, Gunnar Salentin
SUser:~ SUserHG$ c++ -I /opt/local/include/boost example.cpp -o example example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory
It's likely the -I should be: -I/opt/local/include HTH, Nate

Hi Nathan, all,
many thanks for the quick reply: unfortunately it did not work out,
i.e. same error still.
Interesting though, first Terminal said '-bash: SUser:~: no such command'
Then, after trying again, the old error message, i.e.
'example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or
directory' which pops up indenpendently whether it's -I/opt/local/...
or -I /opt/local/...
Still lambda.hpp is exactly where it should be
Btw, OS is Max OS 10.6.5, xcode has been installed 'successfully'
Any further idea?
GS
2011/3/5 Nathan Crookston
Hi Gunnar,
On Fri, Mar 4, 2011 at 6:57 AM, Gunnar Salentin
wrote: <snip details> SUser:~ SUserHG$ c++ -I /opt/local/include/boost example.cpp -o example example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory
It's likely the -I should be:
-I/opt/local/include
HTH, Nate _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Gunnar,
I think Nathan was trying to point out that it should be /opt/local/include not /opt/local/include/boost - i.e. you should include the parent directory of boost because all #includes start with Hi Nathan, all, many thanks for the quick reply: unfortunately it did not work out,
i.e. same error still.
Interesting though, first Terminal said '-bash: SUser:~: no such command'
Then, after trying again, the old error message, i.e.
'example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or
directory' which pops up indenpendently whether it's -I/opt/local/...
or -I /opt/local/...
Still lambda.hpp is exactly where it should be Btw, OS is Max OS 10.6.5, xcode has been installed 'successfully' Any further idea? GS 2011/3/5 Nathan Crookston Hi Gunnar, On Fri, Mar 4, 2011 at 6:57 AM, Gunnar Salentin SUser:~ SUserHG$ c++ -I /opt/local/include/boost example.cpp -o example
example.cpp:1:35: error: boost/lambda/lambda.hpp: No such file or directory It's likely the -I should be: -I/opt/local/include HTH,
Nate
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Gordon Woodhull
-
Gunnar Salentin
-
Nathan Crookston