From: Wolfgang Lux <lux@poseidon.uni-muenster.de>
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 11:06:47 +0100 [thread overview]
Message-ID: <200011221006.eAMA6nP04060@concorde.inria.fr> (raw)
In-Reply-To: Message from Steve Stevenson <steve@cs.clemson.edu> of "Mon, 20 Nov 2000 16:05:20 EST." <14873.37069.529974.959686@merlin.cs.clemson.edu>
Steve Stevenson wrote
> And I use this to compile
>
> 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'
>
> What am I doing wrong?
You use the standard bytecode interpreter, which does not know anything
about your C function, to start your custom executable. Just use
./a.out
to start the program. Actually, you (nearly) never have to call ocamlrun
yourself, the bytecode program contains some nice magic to start up the
right bytecode interpreter for you.
Regards
Wolfgang
--
Wolfgang Lux Phone: +49-251-83-38263
Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259
Universitaet Muenster Email: wlux@uni-muenster.de
next prev parent reply other threads:[~2000-11-23 12:22 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 [this message]
2000-11-22 20:29 ` Xavier Leroy
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=200011221006.eAMA6nP04060@concorde.inria.fr \
--to=lux@poseidon.uni-muenster.de \
--cc=caml-list@inria.fr \
--cc=steve@cs.clemson.edu \
--cc=wlux@uni-muenster.de \
/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