Compiling code that use __gnu_cxx function, with Sun Studio compiler

C

Carfield Yim

HI, I work with some code that using __gnu_cxx::hash_map, and it was
compile using g++, now we get a new M5000 server and we would like to
recompile our code using Sun Studio compiler to get better
performance.

Can we include something and make our old code work? or we need to
change our source code to use the standard library ? Which should be /
opt/SUNstdxpr/prod/include/CC/stlport4/hash_map , right? BTW, any
code sample for that?
 
I

Ian Collins

Carfield said:
HI, I work with some code that using __gnu_cxx::hash_map, and it was
compile using g++, now we get a new M5000 server and we would like to
recompile our code using Sun Studio compiler to get better
performance.


The sun studio forums are the place to ask this.
 
J

Jorgen Grahn

HI, I work with some code that using __gnu_cxx::hash_map, and it was
compile using g++, now we get a new M5000 server and we would like to
recompile our code using Sun Studio compiler to get better
performance.

I wasn't aware that Sun has a decent C++ compiler, but maybe they
have caught up.
Can we include something and make our old code work? or we need to
change our source code to use the standard library ? Which should be /
opt/SUNstdxpr/prod/include/CC/stlport4/hash_map , right? BTW, any
code sample for that?

No, but if you can be sure you can both are in reality the good old
SGI STL container, you should probably just wrap it in a tiny header
and a my_hashmap namespace. (Hm, didn't Boost already to that?)

/Jorgen
 
R

Ron

I wasn't aware that Sun has a decent C++ compiler, but maybe they
have caught up.

They caught up years ago. While their early compiler and it's half-
assed
roguewave library was pretty bad, the 6v2 and later versions were
pretty
nicely standard compliant and efficient. More than I could say for G+
+
on that platform.
.
 

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
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top