STL hash_map

J

jayesah

Hi All,

I am developing my code with Apache stdcxx. I am bound to use STL of
Apache only.
Now today I need hash_map in code but as I learned, it is not
available in Apache since it is not standard c++. Though it is
available with GNU STL.

The code module where I use hash_map will generate separate object
file during compilation. This code module is also using STL string.

What can I do now ?

I planned like this way:

1> The code module that uses hash_map, I will link it statically with
GNU STL.
2> The rest of the modules, which does not use hash_map, I will link it
dynamically with Apache STL.

By this approach my object size of GNU STL (which is linked statically)
is huge in size.

Can anybody please suggest me a better solution with following
conditions in mind?

- I must use hash_map.
- I must use Apache STL.
 
A

AnonMail2005

Hi All,

I am developing my code with Apache stdcxx. I am bound to use STL of
Apache only.
Now today I need hash_map in code but as I learned, it is not
available in Apache since it is not standard c++. Though it is
available with GNU STL.

The code module where I use hash_map will generate separate object
file during compilation. This code module is also using STL string.

What can I do now ?

I planned like this way:

1> The code module that uses hash_map, I will link it statically with
GNU STL.
2> The rest of the modules, which does not use hash_map, I will link it
dynamically with Apache STL.

By this approach my object size of GNU STL (which is linked statically)
is huge in size.

Can anybody please suggest me a better solution with following
conditions in mind?

- I must use hash_map.
- I must use Apache STL.
Mixing two different standard libraries sounds like a nightmare
and may not even be possible.

Just use Apache STL and then a "third party" hash_map. By
third party I mean some code that is easily included and
compiled into your project.

If you can do this with the GNU hash_map (e.g. it's defined
withing a single header file) then go right ahead.

If not, you could use some other hash_map that fits my own
ease of use critria. Boost's hash_map comes to mind although
I don't think it's called a hash_map. I'd go with boost.

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,294
Messages
2,571,507
Members
48,193
Latest member
DannyRober

Latest Threads

Top