From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Steve Stevenson <steve@cs.clemson.edu>
Cc: caml-list@inria.fr
Subject: Re: Missing something in getting C and Ocaml to Work Together
Date: Wed, 22 Nov 2000 21:29:17 +0100 [thread overview]
Message-ID: <20001122212917.A17173@pauillac.inria.fr> (raw)
In-Reply-To: <14873.37069.529974.959686@merlin.cs.clemson.edu>; from steve@cs.clemson.edu on Mon, Nov 20, 2000 at 04:05:20PM -0500
> I have a very simple application. I have the main in ocaml and
> the rest of the system in C. I'm just trying something very straight
> forward.
> [...]
> ocamlc main.cmo -custom -cclib csrc/libmainc.a
> When I do, I get no errors but
> ocamlrun a.out
> produces
> Fatal error: this bytecode file cannot run on this bytecode interpreter
> Mismatch on primitive `cmainarg'
Just run a.out directly, as in "./a.out". The -custom flag to ocamlc
causes it to produce a "mixed" executable containing both OCaml
bytecode and a specially tailored bytecode interpreter that includes
your C code.
Using the standard "ocamlrun" bytecode interpreter on such an
executable fails, because ocamlrun doesn't contain the C functions that
the bytecode part of the mixed executable calls ("cmainarg" here).
Hope this helps,
- Xavier Leroy
next prev parent reply other threads:[~2000-11-23 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-20 21:05 Steve Stevenson
2000-11-22 10:06 ` Wolfgang Lux
2000-11-22 20:29 ` Xavier Leroy [this message]
2000-11-23 12:56 ` Sven LUTHER
2000-11-23 22:25 ` Typing the result of a function Mattias Waldau
2000-11-25 15:54 ` Pierre Weis
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=20001122212917.A17173@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=steve@cs.clemson.edu \
/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