* linking C++ objects?
@ 2004-12-08 18:55 Yamagata Yoriyuki
0 siblings, 0 replies; only message in thread
From: Yamagata Yoriyuki @ 2004-12-08 18:55 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-08 18:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-08 18:55 linking C++ objects? Yamagata Yoriyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox