caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Manually linking generated native code
@ 2017-01-19  9:44 Christoph Höger
  2017-01-19 10:05 ` Bernhard Schommer
  2017-01-19 12:11 ` Gerd Stolpmann
  0 siblings, 2 replies; 5+ messages in thread
From: Christoph Höger @ 2017-01-19  9:44 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

Dear all,

consider a simple test program:

  let _ = Printf.printf "Hello world!\n"

I can generate the relevant assembly just fine, e.g.:

ocamlopt -dstartup -S test.ml
gcc -c a.out.startup.s -c

But I cannot link it:

gcc a.out.startup.o -L$(ocamlc -where) -lasmrun_shared
....
a.out.startup.o(.data+0x6e8): error: undefined reference to
'camlStd_exit__frametable'
collect2: Fehler: ld gab 1 als Ende-Status zurück
distcc[9960] ERROR: compile (null) on localhost failed

It seems that the whole Pervasives is missing (which is kind of expected).

How do I link it, manually? Where are the relevant object files?

thanks,

Christoph

[-- Attachment #2: Type: text/html, Size: 911 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-19 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19  9:44 [Caml-list] Manually linking generated native code Christoph Höger
2017-01-19 10:05 ` Bernhard Schommer
2017-01-19 12:11 ` Gerd Stolpmann
2017-01-19 12:24   ` Christoph Höger
2017-01-19 13:10     ` Gerd Stolpmann

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).