use of changes in STL library
Chris Jefferson
chris@bubblescope.net
Thu May 25 14:04:00 GMT 2006
On 5/25/06, Marek Zuk <marekzuk@gmail.com> wrote:
> Hi
> thanks a lot for your reply.
> I'm not sure if you understood what I meant...
>
> I'm a student of the Faculty of Mathematics & Computer Science at the
> Warsaw University of Technology. I'm in my final year of my studies
> (MSc) and I'm working on my final project.
> The the subject of my project is: "Enhancing associative containers
> (map, multimap, set and multiset) in STL with the possibility of
> choosing the way of their implmentation".
> So I'm going to develop libstdc++.
>
> Now associative containers in STL are implemented by use of red-black
> trees. What I want to do, is to enable the choice of implementation of
> these containers by adding one parameter to the templates, so that the
> containers could by be built by use of b-trees, just vectors or others
> structures.
>
> So my question is:
> How to make changes in libstdc++ and how to test these changes in the
> easiest way?
>
> Thank you very much for your help.
>
My personal advice for doing this would be as follows.
1) Learn how to download, compile and install into a custom directory
all of gcc. You probably want to look at the options to only compile
certain languages (you only want C and C++)
2) Look in the libstdc++-v3 directory. I think everything you want
will be in the include directory. The actual headers you include
(<vector>, <list>, etc.) are in the std directory, for example vector
is called std_vector.h.
3) The actual implementations of the algorithms are in bits/. Explore
around in here to find the implementations.
When you have changed some, recompile by going into the libstdc++-v3 directory.
> Marek Zuk
>
>
> Paolo Bonzini wrote:
> >
> >>> Could you write us what command we should use?
> >>> We'd like to emphasize that we don't want to recompile whole gcc on our
> >>> computer, we just want to make use of changes we did in the repository.
> >>
> >> Short answer is you can't. The gcc build system doesn't support
> >> building just the target libraries. You're going to have to build the
> >> whole thing.
> >
> > You can build GCC only once, and then modify libstdc++. If you don't
> > want to install GCC, you can install libstdc++ with
> >
> > make install-libstdc++-v3
> >
> > Paolo
> >
>
More information about the Gcc
mailing list