473,395 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

STL hash_map

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:

1The code module that uses hash_map, I will link it statically with
GNU STL.
2The 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.

Dec 4 '06 #1
1 9347

ja*****@gmail.com wrote:
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:

1The code module that uses hash_map, I will link it statically with
GNU STL.
2The 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.

Dec 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Florian Liefers | last post by:
"Hello World\n", i get error C2143 (Syntaxerror, missing ';' before '<') using the following code: #include <hash_map> struct eqstr { bool operator()(const char* s1, const char* s2) const
10
by: Jon Cosby | last post by:
I need help in hashmaps. Why doesn't this work: #include <hash_map> hash_map <int, string> hm1; typedef pair <int, string> pr; hm1.insert(str_pair(1, "Hello")); It compiles, but crashes at...
5
by: peter_k | last post by:
Hi I've defined hash_map in my code using this: ------------------------------------------- #include <string> #include <hash_map.h> & namespace __gnu_cxx {
3
by: kony | last post by:
Hi there, I would much appreciate your help with the following problem. Below is the code that uses a hash_map. I want to release all the memory occupied by the hash_map for other use. Apparently...
1
by: Axel Gallus | last post by:
Hello, i have a question concerning STL non-standard hash_maps under Visual Studio 2005: Microsoft STL requires a "hash_compare" object for hash_maps: template <class Key, class Type, class...
2
by: Amit Bhatia | last post by:
Hi, I am trying to use hash maps from STL on gcc 3.3 as follows: #ifndef NODE_H #define NODE_H #include <ext/hash_map> #include "node_hasher.h" class Node; typedef hash_map<pair<int,int>,...
4
by: James Kanze | last post by:
On Jul 16, 10:53 pm, Mirco Wahab <wa...@chemie.uni-halle.dewrote: It depends. You might like to have a look at my "Hashing.hh" header (in the code at kanze.james.neuf.fr/code-en.html---the...
5
by: frankw | last post by:
Hi, I have a hash_map with string as key and an object pointer as value. the object is like class{ public: float a; float b; ...
2
by: marek.vondrak | last post by:
Hi, I am wondering if there are any functional differences between SGI's hash_map and tr1's unordered_map. Can these two containers be interchanged? What would it take to switch from hash_map to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.