From: "Zhu Ping" <zhuping@comp.nus.edu.sg>
To: "Anil Madhavapeddy" <anil@recoil.org>
Cc: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Using Frontc
Date: Sun, 20 Nov 2005 16:44:51 +0800 [thread overview]
Message-ID: <002c01c5edae$afd08d20$1db312ac@comp.nus.edu.sg> (raw)
[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]
Dear Madhavapeddy:
I used FrontC because I hope the parsing result w.r.t a C source code is represented in OCaml code.
I installed CIT and linked my main program with the library released in CIL.
My main program (main.ml) now is:
open Frontc
(* -------------------------------------- Test case for sample1.wh --------------------------------------*)
let parse_result = Frontc.parse "/home/sand/zhuping/sample1.c";
The main program is successfully compiled without linking by executing: ocamlc -c -I /home/sand/cil/obj/x86_LINUX main.ml
But an error occurs when I linked the related object codes together:
ocamlc -o main -I /home/sand/cil/obj/x86_LINUX/ pretty.cmo trace.cmo errormsg.cmo cabs.cmo cabsvisit.cmo escape.cmo cprint.cmo patch.cmo frontc.cmo main.cmo
"Error while linking /home/sand/cil/obj/x86_LINUX/patch.cmo: Reference to undefined global 'Unix' "
I looked into the patch.ml code and found this piece of code where 'Unix' is referenced:
let gettime () : float = (Unix.times ()).Unix.tms_utime
Can anybody help me to solve this problem?
Thank you very much for your help:)
----- Original Message -----
From: "Anil Madhavapeddy" <anil@recoil.org>
To: "Zhu Ping" <zhuping@comp.nus.edu.sg>
Cc: <caml-list@yquem.inria.fr>
Sent: Friday, November 18, 2005 5:52 PM
Subject: Re: [Caml-list] Using Frontc
> On Fri, Nov 18, 2005 at 05:22:37PM +0800, Zhu Ping wrote:
>>
>> I'm using Frontc, which is one of the libraries released in
>> CDK, to parse C source code.
> (snip)
>>
>> 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:)
>
> You haven't said if you must get FrontC to work, or can use any C
> parser. If you dont mind using another package, CIL from Berkeley
> is written in OCaml and is actively developed (and very very good).
>
> You can find more details at http://manju.cs.berkeley.edu/cil/
>
> --
> Anil Madhavapeddy http://anil.recoil.org
> University of Cambridge http://www.cl.cam.ac.uk
>
[-- Attachment #2: Type: text/html, Size: 4047 bytes --]
next reply other threads:[~2005-11-20 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-20 8:44 Zhu Ping [this message]
2005-11-20 12:37 ` Matthieu Dubuget
2005-11-21 8:41 ` Zhu Ping
2005-11-21 9:54 ` Gerd Stolpmann
2005-11-24 6:12 ` Zhu Ping
2005-11-24 10:25 ` skaller
-- strict thread matches above, loose matches on Subject: below --
2005-11-18 9:22 Zhu Ping
2005-11-18 9:52 ` [Caml-list] " Anil Madhavapeddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002c01c5edae$afd08d20$1db312ac@comp.nus.edu.sg' \
--to=zhuping@comp.nus.edu.sg \
--cc=anil@recoil.org \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox