From: Taras <taras.judge@shaw.ca>
To: caml-list@yquem.inria.fr
Subject: ocamlopt and linking
Date: Sat, 11 Dec 2004 23:29:33 -0800 [thread overview]
Message-ID: <41BBF35D.9060809@shaw.ca> (raw)
Hi,
I'm trying to link an ocamlopt-generated object file into a C program by
following instructions on http://caml.inria.fr/ocaml/htmlman/manual032.html
Here is a small testcase: http://glek.net/~taras/os.tar.bz2
Currently it seems that main is already defined in libasmrun and some
symbols are missing from it.
cc -L /usr/lib/ocaml -lasmrun -ldl -lm -lcurses -o prog modwrap.o
mod_from_ml.o main.c
/home/taras/tmp/ccWVigi0.o(.text+0x0): In function `main':
: multiple definition of `main'
/usr/lib/ocaml/libasmrun.a(main.o)(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `main' changed from 39 in
/usr/lib/ocaml/libasmrun.a(main.o) to 96 in /home/taras/tmp/ccWVigi0.o
mod_from_ml.o(.text+0x584): In function `caml_curry6_5':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0x772): In function `caml_curry7_6':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0x77c): In function `caml_curry7_6':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0xd5e): In function `camlPervasives__min_49':
: undefined reference to `caml_lessequal'
mod_from_ml.o(.text+0xd9e): In function `camlPervasives__max_52':
: undefined reference to `caml_greaterequal'
mod_from_ml.o(.text+0x3144): In function `camlList__mem_185':
: undefined reference to `caml_compare'
mod_from_ml.o(.text+0x31da): In function `camlList__assoc_193':
: undefined reference to `caml_compare'
mod_from_ml.o(.text+0x32d6): In function `camlList__mem_assoc_203':
: undefined reference to `caml_compare'
mod_from_ml.o(.text+0x336d): In function `camlList__remove_assoc_213':
: undefined reference to `caml_compare'
mod_from_ml.o(.text+0x4893): In function `camlString__compare_176':
: undefined reference to `caml_compare'
mod_from_ml.o(.text+0x6a28): In function `camlPrintf__doprn_187':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0x6c08): In function `camlPrintf__doprn_224':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0x6d88): In function `camlPrintf__doprn_253':
: undefined reference to `caml_extra_params'
mod_from_ml.o(.text+0x72b3): In function `camlPrintf__scan_format_142':
: undefined reference to `caml_extra_params'
collect2: ld returned 1 exit status
Thanks,
Taras
next reply other threads:[~2004-12-12 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-12 7:29 Taras [this message]
2004-12-12 8:24 ` [Caml-list] " Taras
2004-12-12 9:04 ` Xavier Leroy
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=41BBF35D.9060809@shaw.ca \
--to=taras.judge@shaw.ca \
--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