Version française
Home     About     Download     Resources     Contact us    
Browse thread
c++ files support in ocamlc, ocamlopt & ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vladimir Shabanov <vshabanoff@g...>
Subject: c++ files support in ocamlc, ocamlopt & ocamlbuild
OCaml compilers have support for .c files, and autmatically run CC for
compilation of those. But why there is no such support for C++ files
(.cpp, .cc, .cxx, .C)?

When I write bindings for C++ libraries I need to rename files to .c
and use "ocamlc -cc g++ ...". Or I need to compile them into some .a
library and use "ocamlc -cclib -l... -lstdc++"

With advent of ocamlbuild it would be nice for C++ files to be recognized too.
E.g.:
> ls
some_lib_ml.cpp some_lib.ml
> ocamlbuild some_lib_ml.o some_lib.cma
and that's all.

AFAICS it's not difficult to add support for C++ files (or maybe I'm
wrong?) Is there any plans to support those?