This content has been marked as final. Show 5 replies
You cannot use the RW Tools.h++ that comes with Studio with any other compiler, for two reasons:
1. Legal: It violates the license agreement. For RW Tools.h++ in particular, Oracle's license with Rogue Wave allows distribution only for use with Studio, and your license with Oracle reflects that restriction.
2. Technical: It won't work. Binary code produced by CC is not compatible with binary code produced by g++. The code won't link, and if you could force it to link, it won't run properly, and probably will just crash. For a detailed discussion of this issue, see my paper "Stability of the C++ ABI"
Thank you for your time.
Above one gives a very good in sight regards the c++ ABI.
Could you suggest me the best options (library) to replace the usages of Tools.h++ (i.e RWlibs)?
CPP Boost libraies : http://www.boost.org/
Apache CPP Standard Library : http://stdcxx.apache.org/
SGI STL : http://stdcxx.apache.org/
Thanks in advance,
RW Tools.h++ is a very old product, which has not had significant updates in many years. Most of the functionality in RW Tools.h++ is available in other libraries, although the programming interface is different. (That is, if you have code written for RW Tools.h++, it will need to be re-written.) You can buy the library from Rogue Wave (roguewave.com) if you want to use it with g++ or other compilers.
Much of the functionality of RW Tools.h++ is in the C++ Standard library. The Boost libraries are a good addition for anything else that you need.
The SGI STL and the Apache stdcxx libraries are replacements for the C++ standard library that comes with your C++ compiler. If you download one of these libraries, you will have quite an adventure getting it to build and work correctly with the Studio C++ compiler. But we have already done that work for you. The -library=stlport4 option picks up the STLport version of the SGI STL, and it comes with the compiler. The Apache stdcxx library is available with Solaris 11 for use with Studio C++. Install it in the default locations (in /usr/include and /usr/lib), and use the -library=stdcxx4 option for compiling and linking. Refer to the C++ Users Guide for details about using these alternative libraries.
For g++, using the SGI STL is not a good idea. You can use Apache stdcxx if you want, but the standard library that comes with g++ is a good one, so I would not recommend replacing it unless you have a specific reason.
Boost works very well with g++, since it is developed with and tested with g++. Be sure to check your g++ version with any notes about compilers in the version of Boost that you get.
I too am trying to port an application from solaris CC to GNU g++ that uses RW lib. I came across this post which in turn was really helpful. However didnt understand very good solution to this problem.
have you ported your project successfully? How did you go for it? Which library did you use?
Your help in this regard is really appreciated.
You might get a different answer from the original poster, but I see only two approaches.
1. Get the Tools library from Rogue Wave. They no longer sell Tools.h++ separately, but you can get it as part of SourcePro C++.
I think Tools.h++ is the part of SourcePro called "Essential Tools", but you would have to check with RW for details.
2. Evaluate the functionality you need, and see whether it is part of the C++ Standard Library, or available in other tools sets such as BOOST.
If so, rewrite your code to use the selected library (or libraries).
Which approach is better -- for long term or short term -- only you can decide.