From: Yamagata Yoriyuki <yoriyuki@mbg.ocn.ne.jp>
To: caml-list@inria.fr
Subject: linking C++ objects?
Date: Thu, 09 Dec 2004 03:55:56 +0900 (JST) [thread overview]
Message-ID: <20041209.035556.88469789.yoriyuki@mbg.ocn.ne.jp> (raw)
I think there was a discussion about linking C++ objects, but I could
not find in the archive. I thought that one way is to use -cc option,
but making the linker have correct options may not be easy. Anything
else?
P.S. I use OMake, but OMake does not support mixing C++ and OCaml. I
looked to OCamlProgram function's source to modify it, but I do not
find it. Is it implemented by OCaml? (not OMake script?)
The whole transcription is the following. Sorry for the lengthy
message.
cd /home/yori/src/misc/shinji/shinji/
cd .. && omake
*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.1 sec)
- build shinji dartsStub.o
+ cc -O3 . -I/usr/local/godi/lib/ocaml/std-lib/ -I.. -I../libchasen -I../darts -c dartsStub.cpp
cc: .: linker input file unused because linking not done
- build shinji shinji.opt
+ ocamlopt tools.o dartsStub.o mrph.cmx -o shinji.opt
mrph.o(.text+0xc): In function `camlMrph__fun_132':
: undefined reference to `darts_lookup'
mrph.o(.text+0x22): In function `camlMrph__fun_127':
: undefined reference to `darts_data_of_mrph'
mrph.o(.text+0x32): In function `camlMrph__fun_129':
: undefined reference to `darts_open'
dartsStub.o(.text+0x21): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
dartsStub.o(.text+0x96): In function `darts_open(long, long, long)':
: undefined reference to `operator new(unsigned)'
dartsStub.o(.text+0xdb): In function `darts_open(long, long, long)':
: undefined reference to `cha_mmap_file'
dartsStub.o(.text+0xe6): In function `darts_open(long, long, long)':
: undefined reference to `cha_mmap_map'
dartsStub.o(.text+0x127): In function `darts_open(long, long, long)':
: undefined reference to `cha_mmap_file'
dartsStub.o(.text+0x135): In function `darts_open(long, long, long)':
: undefined reference to `cha_mmap_file'
dartsStub.o(.text+0x154): In function `darts_open(long, long, long)':
: undefined reference to `operator delete[](void*)'
dartsStub.o(.text+0x164): In function `darts_open(long, long, long)':
: undefined reference to `operator delete[](void*)'
dartsStub.o(.text+0x229): In function `darts_lookup(long, long, long, long)':
: undefined reference to `cha_mmap_map'
dartsStub.o(.text+0x36d): In function `darts_data_of_mrph(long)':
: undefined reference to `cha_mmap_map'
dartsStub.o(.text+0x3cc): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
dartsStub.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Error during linking
*** omake: failed (23.1 sec, 0/25 scans, 2/23 rules, 2/70 digests)
*** omake: targets were not rebuilt because of errors:
shinji/shinji.opt
Compilation exited abnormally with code 2 at Thu Dec 9 03:38:11
--
Yamagata Yoriyuki
reply other threads:[~2004-12-08 18:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041209.035556.88469789.yoriyuki@mbg.ocn.ne.jp \
--to=yoriyuki@mbg.ocn.ne.jp \
--cc=caml-list@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