|
Boost Users : |
Subject: Re: [Boost-users] Problems with stl::map
From: Lars Viklund (zao_at_[hidden])
Date: 2013-04-02 11:09:55
On Tue, Apr 02, 2013 at 09:47:16AM -0500, Michael Powell wrote:
> On Tue, Apr 2, 2013 at 12:31 AM, Eric Niebler <eniebler_at_[hidden]> wrote:
>
> > On 13-04-01 06:14 PM, Michael Powell wrote:
> > > Hello,
> > >
> > > Perhaps there is a boost answer for this, I don't know.
> > >
> > > I have a typedef unsigned char byte defined in global scope. Then a
> > > typedef byte address_type defined in the scope of a class.
> > >
> > > I'd like to setup a std::map<address_type, byte> if at all possible.
> > >
> > > Or just in general, use std::map, but it doesn't seem to like anything I
> > > give it.
> > >
> > > I am building using GCC 4.7.2 cross compiling to ARM through Sourcery
> > > CodeBench for ARM.
> > >
> > > Kind of at a loss.
> >
> > This is a mailing list for users of Boost. Let's keep it on-topic. Thanks.
> >
>
> Would like to. I try to do something simple like #include <map> ... typedef
> std::map<int, int> my_map; and I get "Symbol 'map' could not be resolved".
>
> I doubt it's a language thing, not sure whether that's an IDE thing, or I
> need to include another library than GLIBC to get it to work.
>
> Or, is there a boost alternative I could use if this one won't work. I hate
> to do something like that for such a core container, but would help expose
> maps into the approach where needed.
In general, Boost tends to assume that the environment has a reasonably
functioning standard library.
In the case of GCC, this tends to be provided via libstdc++, and a
compiler tends to in the general case be preconfigured to point out the
right headers and library directories for it to work properly.
Consider contacting whatever support you have for your toolchain, as
this is something rather fundamental you need to address before having
much luck in building any non-freestanding C++ code.
If your toolchain vendor ships broken toolchains that are not fit for
use, fix your vendor or consider investing in platforms that doesn't
have damaged vendors.
-- Lars Viklund | zao_at_[hidden]
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