Douglas Walls' Weblog

« Previous day (Dec 3, 2006) | Main | Next day (Dec 5, 2006) »
20061204 Monday December 04, 2006

What About Binary Compatibility?

»What will happen if I try to run my application on a newer Solaris OS release?

»What will happen if I try to compile my application using one version of the Sun Studio compilers and link it with libraries compiled with earlier compiler versions?

Important questions to consider, and luckily both Solaris and the Sun Studio compilers guarantee a certain degree of binary compatibility between releases.

Here are some things to keep in mind



Specific Questions I get often:


        »Can I compile my application on Solaris 10 and run it on Solaris 9 and Solaris 8?

No.  Might work, but since you compiled it on Solaris 10, it might also be using system interfaces that did not exist on Solaris 8 and 9 or have changed in Solaris 10.

        »Can I compile my application on Solaris 8 and run it on Solaris 9 and Solaris 10?

 Yes!  This is what binary compatibility is all about.  (See above)

        »Can I compile and build my shared library on Solaris 10 and use it on Solaris 9 and Solaris 8?

No.  Might work, but since you compiled it on Solaris 10, it might also be using system interfaces that did not exist on Solaris 8 and 9 or have changed in Solaris 10.

        »If I compile the code in my shared library using the Sun Studio 11 compilers, can my customers who are still using Forte 6 Update 1 compilers link with these shared libraries?

No.  You must always link with the same compiler used to create the newest objects in your application or library.  So, if Sun Studio 11 compilers are used to compile the code in a shared library, Sun Studio 11 compilers must be used when linking with that shared library.
 

( Dec 04 2006, 02:19:06 PM PST ) Permalink Comments [3]

Search

Calendar

Links

Navigation

Referers