1. ocaml Overview
Starting with ocaml 3.05, there are no less than three ports
Objective caml for MS windows available:
-A Native WIN32 port, built with the Microsoft development tools;
-A Native WIN32 port, built with the cygwin/mingw development tools;
-A port consisting of the UNIX sources compiled under the cygwin
Unix-like environment for Windows.
Here is a summary of the main differences between these ports:
Native MS (native mingw cygwin)
Third-party software required
-For base bytecode system none
-For ocamlc-custom msvc cygwin
-For native-code generation msvc + MASM cygwin
Speed of bytecode interpreter 70% 100% 100%
Replay debugger No Yes
The UNIX library partial full
The threads library yes
The graphics library Yes No
Restrictions on generated executables? None none Yes (*)
2. ocamlc related options under Win
Usage: ocamlc <Options> <files>
Options are:
-A build a library
-C compile only (do not link)
-CC <command> use <command> as the C compiler and linker
-Cclib <opt> pass option <opt> to the C linker
-Ccopt <opt> pass option <opt> to the C compiler and linker
-Custom link in custom Mode
-Dllib <lib> use the dynamically-loaded library <lib>
-Dllpath <dir> Add <dir> to the run-time search path for shared libraries
-Dtypes save type information in <FILENAME>. annot
-G save debugging information
-I print inferred Interface
-I <dir> Add <dir> to the list of include directories
-Impl <File> compile <File> As A. ml File
-INTF <File> compile <File> As A. MLI File
-INTF-suffix <string> suffix for interface files (default:. MLI)
-Intf_suffix <string> (Deprecated) Same as-INTF-suffix
-Labels use commuting label Mode
-Linkall link all modules, even unused ones
-Make-runtime build a runtime system with given C objects and libraries
-Make_runtime (Deprecated) Same as-make-runtime
-Modern (Deprecated) Same as-labels
-Noassert don't compile assertion checks
-Noautolink don't automatically link C libraries specified in. CMA files
-Nolabels ignore non-optional labels in Types
-Nostdlib do not add default directory to the list of include directories
-O <File> set output file name to <File>
-Output-OBJ output a C object file instead of an executable
-Pack package the given. CMO files into one. CMO
-PP <command> pipe sources through Preprocessor <command>
-Principal check principality of type inference
-Rectypes allow arbitrary recursive types
-Thread generate code that supports the system threads Library
-Unsafe no bounds checking on array and string access
-Use-runtime <File> generate bytecode for the given runtime system
-Use_runtime <File> (Deprecated) Same as-use-runtime
-V print compiler version and location of standard library and exit
-Version print compiler version and exit
-Verbose print callto External commands
-Vmthread generate code that supports the threads library with VM-Level Scheduling
-W <flags> enable or disable warnings according to <flags>:
A/A enable/disable all warnings
C/C enable/disable suspicious comment
D/d enable/disable deprecated features
E/E enable/disable fragile match
F/F enable/disable partially applied Function
L/L enable/disable labels omitted in Application
M/M enable/disable overriden Method
P/P enable/disable partial match
S/S enable/disable non-unit statement
U/u enable/disable unused match case
V/V enable/disable hidden instance variable
X/x enable/disable all other warnings
Default setting is "Ale"
(All warnings but labels and fragile match enabled)
-Warn-error <flags> treat the warnings enabled by <flags> as errors.
See option-W for the list of flags.
Default setting is "A" (warnings are not errors)
-Where print location of standard library and exit
-Nopervasives (unmarshented)
-Dparsetree (uninitialized ented)
-Drawlambda (unmarshented)
-Dlamted (unmarshented)
-Dinstr (uninitialized ented)
-Use-prims <File> (unencrypted ented)
-<File> treat <File> as a file name (even if it starts '-')
-Help display this list of options
-- Help display this list of options