C and C++ compilers
SCO provides three different options
for C and C++ compilers on SCO OpenServer:
Each of these are discussed below. Development systems for older operating systems such as SCO UNIX and XENIX are not covered here, but you can find out about them in the comp.unix.sco.programmer FAQ.
This is the development system specifically designed for use with SCO OpenServer, and sometimes referred to as the "native" development system because it is used to build most of the operating systsem. It is a licensed product included on the main SCO OpenServer Release 5.0.6 CD-ROM. Discounts on the license are available if you join the SCO Global Developer Program.
You must use the native development system when writing device drivers. It also provides the best integration with OpenServer system headers and system libraries, and with existing third-party objects and libraries. It is the most reliable to use when generating older object formats (COFF).
The native SCO OpenServer C and C++ compilers do not produce code specifically optimized for Pentium Pro or later Intel architectures. The C++ compiler represents the 1992 level of the language and does not include many of the new language or library features of the 1998 ANSI/ISO C++ standard. Debugger support of C++ is weak, although you can use the UDK debugger with SCO OpenServer C++ binaries to get around this issue. These compilers lack the 64-bit long long integer type and have limited flexibility in incorporating inline assembly code. No new enhancements are planned for these compilers.
The Developer's Media Kit (DMK) can be ordered separately to get native development systems for earlier SCO OpenServer releases.
The GNU Compiler Collection (GCC) provides well-known, high-quality tools that are used heavily on Linux and on many other UNIX platforms. GCC is free and can be downloaded from our web site or installed from the Open License Software Supplement CD-ROM in our operating system media kits.
If you use GCC on other platforms, you will experience no learning curve in using it on SCO OpenServer. If your application has been built with GCC on other platforms, it will be quickest to port if you use GCC on SCO OpenServer. GCC provides good integration with SCO OpenServer system headers and system libraries, and with existing third-party objects and libraries. The C++ compiler in GCC implements many of the new C++ language and library features.
The GCC compilers are not yet fully supported by SCO, although support is available through the open source and Skunkware communities. The GCC compilers are idiosyncratic in language interpretation, and you must be careful if you want source code built with them to be portable to non-GCC platforms. Performance is generally less than with either the native SCO OpenServer or the UDK compilers.
This is the most powerful SCO development system available, providing the most current standards conformance. It is a licensed product provided on its own CD-ROM in the SCO OpenServer Release 5.0.6 and all other SCO operating system media kits; license discounts are available if you join the SCO Global Developer Program.
Use the UDK if you want your applications to have the best performance, especially on Pentium, Pentium Pro, Pentium II, and Pentium III based machines; performance is superior to both of the previous choices. You must use the UDK compilers if you are writing Java native methods (JNI). The UDK C++ compiler has many of the new C++ language features, and in general the UDK compilers provide the best C and C++ standards conformance. The UDK debugger is generally the strongest of the debuggers in the three choices (and can be used in conjunction with the SCO OpenServer and GCC compilers if desired). This is also the best choice if you want to produce a binary that runs on all SCO operating system platforms.
The UDK cannot be used for SCO OpenServer device drivers. The UDK cannot be used for APIs that are not common to both SCO OpenServer and UnixWare 7. Most significantly, the UDK cannot be used if you need to link against existing third-party object files or libraries that were built with the SCO OpenServer compiler.
Many customers want to build application packages that can be used on both SCO OpenServer and UnixWare 7 systems. You have two different ways to approach this:
The advantage of the single binary approach is that it can reduce your development and maintenance costs. The limitation of the single binary approach is that you must confine yourself to using APIs that are present on all SCO platforms, and you must not link against existing third-party objects or libraries built on SCO OpenServer or UnixWare2.
The following code sample illustrates how to test for various SCO platforms when doing conditional compilations:
#include <stdio.h>main() { #if defined(_SCO_DS) printf("OpenServer\n"); #elif defined(__UNIXWARE__) printf("UnixWare gcc\n"); #elif defined(__USLC__) #if defined( __STDC_VERSION__ ) && __STDC_VERSION__ == 199409 printf("Gemini I cc (UW7 and UDK)\n"); #else printf("UnixWare cc\n"); #endif #elif defined(M_UNIX) printf("ODT 3 or earlier\n"); #else printf("Other platform\n"); #endif }