STL on Solaris with Forte 7.0 compiler

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2005
Posts: 466
Reputation: winbatch is on a distinguished road 
Solved Threads: 18
winbatch's Avatar
winbatch winbatch is offline Offline
Posting Pro in Training

STL on Solaris with Forte 7.0 compiler

 
0
  #1
Apr 27th, 2005
Hi,

I've been experimenting with STL on solaris with the 7.0 sun compiler. I am able to write programs using string, map, vector, list, etc. however, I am trying to use hash_map and can't get the most basic (ie hash_map<string,string> h; ) to compile. It appears that hash_map is not part of the regular include path, and I've tried to find it in other places in the compiler's directories. While I've found it, it doesn't seem to compile. Does anyone have any ideas about this (understandably obscure/solaris specific) problem?

CC -V
CC: Forte Developer 7 C++ 5.4 2002/03/09

  1. #include <algorithm>
  2. #include <hash_map>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. hash_map<string,string> myMap;
  9. return 0;
  10. }

  1. 155 |/export/SUNWspro> find . -name 'hash_map*' -print
  2. ./prod/include/CC/stlport4/hash_map.SUNWCCh
  3. ./prod/include/CC/stlport4/hash_map

  1. 56 |/export/SUNWspro> find . -name '*stl*' -print
  2. ./prod/lib/stlport4
  3. ./prod/lib/stlport4/libp/libstlport.a
  4. ./prod/lib/stlport4/libstlport.a
  5. ./prod/lib/stlport4/libstlport_dbg.a
  6. ./prod/lib/stlport4/libstlport.so.1
  7. ./prod/lib/stlport4/v9/libstlport.so.1
  8. ./prod/lib/stlport4/v9/libp/libstlport.a
  9. ./prod/lib/stlport4/v9/libstlport.a
  10. ./prod/lib/stlport4/v9/libstlport_dbg.a
  11. ./prod/include/CC/stlport4
  12. ./prod/include/CC/stlport4/config/stl_confix.h
  13. ./prod/include/CC/stlport4/config/stl_solaris.h
  14. ./prod/include/CC/stlport4/config/stl_sunpro.h
  15. ./prod/include/CC/stlport4/config/stlcomp.h
  16. ./prod/include/CC/stlport4/stl
  17. ./prod/include/CC/stlport4/stl_user_config.h
  18. ./inventory/v10n1/SPROstl4h
  19. ./inventory/v10n1/SPROstl4a
  20. ./inventory/v10n1/SPROstl4o
  21. ./inventory/v10n1/SPROstl4x
  22. ./inventory/v10n1/SPROstl4y
  23. ./lib/stlport4
  24. ./lib/stlport4/libstlport.so
  25. ./lib/stlport4/libstlport.so.1
  26. ./lib/stlport4/v9/libstlport.so
  27. ./lib/stlport4/v9/libstlport.so.1


Compile attempt:
  1. /export/SUNWspro/bin/CC -w -c -I./ -I../libs -I/export/SUNWspro/prod/include/CC/stlport4 -g -D_DEBUG -D__SUNOS__ -c *.cpp
  2. /export/SUNWspro/bin/CC -Bdynamic -lsocket -lnsl -L/export/SUNWspro/lib/stlport4 -lstlport -lhoff *.o -o Test

I get the following warnings (many more, all roughly the same)
  1. ld: warning: symbol `std::basic_stringbuf<char,std::char_traits<char>,std::allocator<char> >::__vtbl' has differing sizes:
  2. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x40; file /export/SUNWspro/lib/libCstd.so value=0x3c);
  3. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  4. ld: warning: symbol `std::time_get_byname<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t> > >::__vtbl' has differing sizes:
  5. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x24; file /export/SUNWspro/lib/libCstd.so value=0x2c);
  6. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  7. ld: warning: symbol `std::num_get<char,std::istreambuf_iterator<char,std::char_traits<char> > >::__vtbl' has differing sizes:
  8. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x38; file /export/SUNWspro/lib/libCstd.so value=0x40);
  9. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  10. ld: warning: symbol `std::moneypunct_byname<char,false>::__vtbl' has differing sizes:
  11. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x30; file /export/SUNWspro/lib/libCstd.so value=0x38);
  12. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  13. ld: warning: symbol `std::ctype<char>::__vtbl' has differing sizes:
  14. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x2c; file /export/SUNWspro/lib/libCstd.so value=0x34);
  15. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  16. ld: warning: symbol `std::codecvt_byname<char,char,__mbstate_t>::__vtbl' has differing sizes:
  17. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x28; file /export/SUNWspro/lib/libCstd.so value=0x30);
  18. /export/SUNWspro/lib/stlport4/libstlport.so definition taken
  19. ld: warning: symbol `std::clog' has differing sizes:
  20. (file /export/SUNWspro/lib/stlport4/libstlport.so value=0x68; file /export/SUNWspro/lib/libCstd.so value=0x60);
  21.  
<< moderator edit: added [code][/code] tags -- though I'm not 100% sure about where I put them >>
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,622
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 714
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: STL on Solaris with Forte 7.0 compiler

 
0
  #2
Apr 29th, 2005
What happens if you try to use a standard container, such as map? Same errors? Or is it specific to the extended containers and algorithms?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 466
Reputation: winbatch is on a distinguished road 
Solved Threads: 18
winbatch's Avatar
winbatch winbatch is offline Offline
Posting Pro in Training

Re: STL on Solaris with Forte 7.0 compiler

 
0
  #3
Apr 29th, 2005
Works perfectly fine with map, vector, list, etc., without having to use any special include paths or libraries. No warnings on compilation either.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC