Linking objects between WorkShop 4.2 and 5.0

We are currently using WorkShop 4.2 on our Solaris 2.6 machine, but planning to upgrade to WorkShop 5.0. We have many 3rd party libraries compiled by WorkShop 4.2 and no new version is available. Can we build our binaries using some objects built by 4.2 compiler and some from 5.0 compiler ?

[305 byte] By [jipm] at [2007-11-25 23:41:03]
# 1

I have the same problem, and it looks like it doesn't work. Check out http://docs.sun.com/ab2/coll.32.5/CPPMIGRATE/@Ab2PageView/1210?Ab2Lang=C&Ab 2Enc=iso-8859-1.

in short:

Mixing Old and New Binaries

It is an overstatement to say that object files and libraries compiled by the 4.2 compiler cannot be linked with object files and libraries compiled by the 5.0 compiler. The statement is true whenever the files and libraries present a C++ interface.

jipm at 2007-7-5 18:48:46 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
If you use the compat=4 option when compiling your code with 5 you can use your libraries from 4.2 but if you use the feault compat=5 you will not be able to use the libraries becuase the name mangling had changed in version 5.
xelaju at 2007-7-5 18:48:46 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Using compat=4 may limit you to features of the standard that were implimented in 4.2. If you want to use fully ISO compliant stuff you may need to get those old libraries upgraded.
xelaju at 2007-7-5 18:48:46 > top of Java-index,Development Tools,Solaris and Linux Development Tools...