* [Caml-list] Creating a dynamic Library on Mac OS X
@ 2012-07-12 15:09 Keyan
0 siblings, 0 replies; only message in thread
From: Keyan @ 2012-07-12 15:09 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
Hi,
I have the following problem. In my main program, I load dynamic libraries during runtime on demand. One of those libraries will access ocaml code. Compiling works fine, until I link everything to a dynamic library, in which case I get the following error:
Undefined symbols for architecture x86_64:
"_caml_code_area_start", referenced from:
_segv_handler in output.a(signals_asm.o)
_caml_code_checksum in output.a(intern.o)
_intern_rec in output.a(intern.o)
_extern_rec in output.a(extern.o)
"_caml_code_area_end", referenced from:
_segv_handler in output.a(signals_asm.o)
_caml_code_checksum in output.a(intern.o)
_intern_rec in output.a(intern.o)
_extern_rec in output.a(extern.o)
"_caml_atom_table", referenced from:
_caml_alloc in output.a(alloc.o)
_caml_alloc_dummy_float in output.a(alloc.o)
_caml_alloc_dummy in output.a(alloc.o)
_caml_alloc_array in output.a(alloc.o)
_caml_copy_string_array in output.a(alloc.o)
_intern_alloc in output.a(intern.o)
_intern_rec in output.a(intern.o)
...
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [all] Error 1
I use:
ocaml 3.12.1
Darwin 11.4.0 (Mac OS X 10.7.4)
gcc: i686-apple-darwin11-llvm-gcc-4.2
I don't use Xcode, but cmake/make.
Attached to this email is a minimal example, demonstrating the problem. It is fully self-containable, i.e. it contains the Makefile and the source files.
Cheers,
Keyan
[-- Attachment #2: example.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 1836 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-12 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 15:09 [Caml-list] Creating a dynamic Library on Mac OS X Keyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox