Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help needed regards the usage of STL.....with CC

858326Oct 20 2011 — edited Oct 21 2011
Hi All,

I am relatively new to SOLARIS. I am trying to figure out the options for using the STL components in the project.

The project needs to be compiled with both CC ang g++, should support both SOLARIS and LINUX systems. That's why i am going for STL components rather than using the RW-Components of Tools.h++.

I have the following doubts regards the usage of STL.

CC provides the -library option to link the libraries we require.

The following is what i understood from the documentation:

No ( -library ) option provides - default libraries included -lCstd -lCrun -lm -lw -lcx -lc+
-library=iostream+ - libraries included -liostream -lCstd -lCrun -lm -lw -lcx -lc+
-library=iostream,no%Crun+ - libraries included -liostream -lCstd -lm -lw -lcx -lc+
-library=stlport4+ - libraries included -lstlport4 -lCrun -lm -lw -lcx -lc+
-library=iostream,no%Cstd+ - Invalid combination, some header files missing [[ *iostream, sstream* ]]


When we try to make a new project, which of the following is recommended?

#! - Use libCstd suppplied along with solaris package.
When solaris makes a new release, is it always guaranteed that project is compatible with new libCstd ? (Is there a backward compatibility?)
The STL components which can be used in the project are limited. i.e we can use only those that come along with libCstd.....right?
Might not be compatible with other c++ compilers. ( Not compatible with g++ ) Right?

#2 - Use libCStd along with libiostream
Can we use STL (supported by libCstd ) + Classic-iostreams and still have the backward-compatibility?
Compatible with other C++ compilers....provided care has been taken of the CC STL Specializations. ( Compatible with g++ ) Right?

#3 - Use stlport4. Is it stable and backward-compatible ?
We can exploit usage of STL to the maximum.
Is it guranteed that the project (using -library=stlport4 ) will be backward compatible ?
Can the SunStudio (ORACLE) organization gurantee that stlport will take care of the changes in the CPP standards ?
i.e Is it guranteed that STLPORT and SUN-STUDIO packages will always be in sync?

Among the above three which is preferred method to go ensuring stability and backward-compatibility.


Thanks in advance.


Cheers,
Sreekar

Edited by: 855323 on 20-Oct-2011 04:04

Edited by: 855323 on 20-Oct-2011 04:04

Edited by: 855323 on 20-Oct-2011 04:06
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 18 2011
Added on Oct 20 2011
2 comments
331 views