• en

Portability

Supported platforms

The bytecoded system currently runs on any POSIX-compliant operating system with an ANSI-compliant C compiler (and tries hard to accommodate deviations from POSIX and ANSI-C). It should run straight out of the box on all Unix and Unix-compatible systems, including Linux and MacOS X. (See below for MS Windows.) While not mandatory, it is recommended to use the GNU gcc compiler to compile the distribution.

The native-code compiler currently supports the following processor/operating system combinations:

Processors Operating systems
Tier 1 platforms
(actively used and maintained by the core Caml team):
AMD64 (Intel and AMD x86 processors in 64-bit mode) Linux, MacOS X
IA32 (Intel and AMD x86 processors in 32-bit mode) Linux, FreeBSD, MacOS X, Microsoft Windows
Power PC Linux, Mac OS X
ARM Linux
Tier 2 platforms
(maintained but less actively, with help from users):
AMD64 Microsoft Windows, FreeBSD, OpenBSD
IA32 NetBSD, OpenBSD, Solaris 9
PowerPC NetBSD
SPARC Solaris 9, Linux, NetBSD

Other operating systems for the processors above have not been tested, but the compiler may work under other operating systems with little work.

Ports for Microsoft Windows

There are no less than four ports of Objective Caml for Microsoft Windows available:

  • a native Win32 port, built with the MinGW development tools;
  • a native Win32 port, built with the Microsoft development tools (Microsoft Visual C++ and Microsoft Assembler);
  • a port consisting of the Unix sources compiled under the Cygwin Unix-like environment for Windows.
  • a native Win64 (64-bit Windows) port, built with the Microsoft development tools (Microsoft Visual C++ and Microsoft Assembler);

Here is a summary of the main differences between these ports:

Native Microsoft Native MinGW Cygwin
Third-party software required
- for base bytecode system
- for ocamlc -custom
- for native-code generation

none
MSVC
MSVC + MASM

none
Cygwin
Cygwin

none
Cygwin
Cygwin
Speed of bytecode interpreter 70 % 100 % 100 %
Debugger partial partial full
Libraries
- Unix
- Threads
- Graphics

partial
yes
yes

partial
yes
yes

full
yes
no
Restrictions on generated executables none none yes*
  • Cygwin-generated .exe files refer to a DLL that is distributed under the GPL. Thus, these .exe files can only be distributed under a license that is compatible with the GPL. Executables generated by MSVC or by MinGW have no such restrictions.