|
Boost Users : |
Subject: Re: [Boost-users] [interprocess] compilation error in interprocess vector
From: Anthony Foiani (tkil_at_[hidden])
Date: 2012-03-07 22:53:32
Andrew Schweitzer <a.schweitzer.grps_at_[hidden]> writes:
> I'm trying to use interprocess' containers. I get compilation errors
> when including the container header files. For example:
>
> #include <boost/interprocess/containers/vector.hpp>
>
> gives:
>
> g++ -I../../include -I"/home/schweitz/work/boost/boost_1_49_0" -O3
> -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP
> -MF"EmbeddedServiceProcessor.d" -MT"EmbeddedServiceProcessor.d" -o
> "EmbeddedServiceProcessor.o" "../EmbeddedServiceProcessor.cpp"
> In file included from
> /home/schweitz/work/boost/boost_1_49_0/boost/container/detail/iterators.hpp:27:0,
> from
> /home/schweitz/work/boost/boost_1_49_0/boost/container/vector.hpp:38,
> from
> /home/schweitz/work/boost/boost_1_49_0/boost/interprocess/containers/vector.hpp:19,
> from ../EmbeddedServiceProcessor.cpp:295:
> /home/schweitz/work/boost/boost_1_49_0/boost/container/detail/variadic_templates_tools.hpp:44:19:
> error: expected nested-name-specifier before ¡add_const_reference¢
>
> and so forth. Any suggestions?
Is it possible that you're pulling in an old version of some of those
files? The ones in the error backtrace look good, but it's possible
that some of the underlying files are getting picked up from an older
install of boost.
(This is especially true as the boost/container stuff only moved out
of boost/interprocess in the last release or two, IIRC).
In particular, I get that error if the type after a "typename" has not
been declared.
In r76106, there's this change:
namespace boost {
namespace container {
-namespace containers_detail {
+namespace container_detail {
So if you *are* mixing headers from different versions of boost, the
namespace has changed name quite recently. (That's from 2011-12-22,
so between 1.48.0 and 1.49.0)
If you look at the preprocessor output with "-E" (?), it should show
you which files were included. (Or use 'strace' on the g++
invocation, I suppose.)
Good luck,
t.
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