Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004920OCamlOCaml documentationpublic2009-11-15 17:142013-08-12 16:16
Reporterecc 
Assigned To 
PrioritynormalSeveritytextReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target Version4.01.0+devFixed in Version4.01.0+dev 
Summary0004920: example of linking C main with OCaml runtime needs additional libraries
DescriptionIn the manual chapter "Interfacing C with Objective Caml", subsection "Advanced topic: callbacks from C to Caml", sub-subsection "Embedding the Caml code in the C code":

1. It's not necessary to include unix.cma in the ocamlopt command, or -lunix in the gcc command (unless required by the OCaml code, of course)

2. It is necessary to add both "-lm" and "-ldl" at the end of the gcc command line.

(on Linux, at least)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0006914)
doligez (administrator)
2012-02-10 17:33

About (1): I think that's quite clear from the manual: it includes this sentence:

>> For instance, assume the OCaml part of your program uses the Unix library.
(0010160)
doligez (administrator)
2013-08-12 16:03

About (2): on Mac OS X, I don't need "-lm" nor "-ldl". I need "-lcurses" but only in the byte-code case...
(0010161)
doligez (administrator)
2013-08-12 16:16

Added a sentence to the manual (rev 13992).

- Issue History
Date Modified Username Field Change
2009-11-15 17:14 ecc New Issue
2009-12-08 17:31 doligez Status new => acknowledged
2012-02-10 17:33 doligez Note Added: 0006914
2012-09-06 16:44 doligez Target Version => 4.00.1+dev
2012-09-17 17:44 doligez Target Version 4.00.1+dev => 4.00.2+dev
2013-07-10 19:42 doligez Target Version 4.00.2+dev => 4.01.0+dev
2013-08-12 16:03 doligez Note Added: 0010160
2013-08-12 16:16 doligez Note Added: 0010161
2013-08-12 16:16 doligez Status acknowledged => resolved
2013-08-12 16:16 doligez Resolution open => fixed
2013-08-12 16:16 doligez Fixed in Version => 4.01.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker