[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Zhu Ping <zhuping@c...> |
| Subject: | Using Frontc |
Dear OCaml users:
I'm using Frontc, which is one of the libraries released in CDK, to parse C source code.
I downloded the complete binaries for Linux i386 libc6 from http://pauillac.inria.fr/cdk/binaries/binaries-3.03/gz/cdk-3.03.tar.gz and installed it on a Linux server by following the installation instructions.
The following code (mail.ml) is the main ocaml program that use Frontc to parse a sample code written in C language.
open Frontc
(* -------------------------------------- Test case for sample1.c --------------------------------------*)
let parse_result = Frontc.parse_file "/home/sand/zhuping/sample1.c" error_channel;
I compiled the maim.ml using this command: ocamlopt -I /usr/local/lib/cdk-3.03/lib/ocaml-3.03/ main.ml
But some error returns: /usr/local/lib/cdk-3.03/lib/ocaml-3.03/pervasives.cmi is not a compiled interface
All the Frontc codes located under the directory /usr/local/lib/cdk-3.03/lib/ocaml-3.03/ are compiled codes:
frontc.a
frontc.cma
frontc.cmi
frontc.cmx
frontc.cmxa
clexer.cmi
clexer.cmx
cparser.cmi
cparser.cmx
cabs.cmi
cabs.cmx
cprint.cmi
cprint.cmx
There are no source implementation/interface files with respect to the corresponding files listed above.
Can anybody help to to solve this problem? Thank you very much for your help:)