From: Brian Hurt <brian.hurt@qlogic.com>
To: Jung Woon Ho <unosoft@hotmail.com>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] Question in Linking C and Ocaml
Date: Wed, 2 Jul 2003 17:44:10 -0500 (CDT) [thread overview]
Message-ID: <Pine.LNX.4.33.0307021741210.16770-100000@eagle.ancor.com> (raw)
In-Reply-To: <BAY1-F54sTDWWcuZcGw00018e4c@hotmail.com>
On Wed, 2 Jul 2003, Jung Woon Ho wrote:
> Hi,
> Im trying to link some Ocaml files to my C program. And I'm having
> difficulties in liking them together.
> here is what I do....
>
> 1) compile all my Ocaml src code with the following command.
> ocamlopt -c -output-obj <filenames>
Is there a reason you're producing C code here? I've had good results
just doing:
1) Use ocamlopt -c on ocaml files to produce .cm[oi] files (note: no
-output-obj here).
2) Use gcc -c on C files to produce .o files
3) Use ocamlopt to link .cmo and .o files.
> Gives me the following errors:
>
> sched/sched.a(modwrap.o)(.text+0x27): In function `fib':
> : undefined reference to `caml_named_value'
> sched/sched.a(modwrap.o)(.text+0x42): In function `fib':
> : undefined reference to `copy_string'
It looks like you might need to link in some Ocaml-specific libraries.
Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2003-07-02 22:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-02 21:48 Jung Woon Ho
2003-07-02 22:44 ` Brian Hurt [this message]
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=Pine.LNX.4.33.0307021741210.16770-100000@eagle.ancor.com \
--to=brian.hurt@qlogic.com \
--cc=caml-list@inria.fr \
--cc=unosoft@hotmail.com \
/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;
as well as URLs for NNTP newsgroup(s).