MantisBT - OCaml
View Issue Details
0004963OCaml~DO NOT USE (was: OCaml general)public2010-01-19 15:022013-08-31 12:44
glondu 
lefessan 
normalminoralways
closedfixed 
3.11.1 
3.13.0+dev 
0004963: Please add extern "C" declarations (for C++) in installed headers
Hello,

In most system headers, declarations are surrounded by the following:

#ifdef __cplusplus
extern "C" {
#endif

[...]

#ifdef __cplusplus
}
#endif

allowing their direct use in C++ code. It would be nice if OCaml did the same.


Cheers,
--
St├ęphane Glondu
Bugreport forwarded from: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565894 [^]
No tags attached.
has duplicate 0005467closed meyer no extern "C" into ocaml C-stub headers 
Issue History
2010-01-19 15:02glonduNew Issue
2011-05-31 16:49doligezNote Added: 0005945
2011-05-31 16:49doligezStatusnew => acknowledged
2011-08-13 00:27glonduNote Added: 0006088
2012-01-06 23:45protzRelationship addedhas duplicate 0005467
2012-01-16 22:34lefessanNote Added: 0006689
2012-01-16 22:34lefessanStatusacknowledged => resolved
2012-01-16 22:34lefessanFixed in Version => 3.13.0+dev
2012-01-16 22:34lefessanResolutionopen => fixed
2012-01-16 22:34lefessanAssigned To => lefessan
2013-08-31 12:44xleroyStatusresolved => closed
2017-02-23 16:36doligezCategoryOCaml general => -OCaml general
2017-03-03 17:55doligezCategory-OCaml general => -(deprecated) general
2017-03-03 18:01doligezCategory-(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04doligezCategory~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Notes
(0005945)
doligez   
2011-05-31 16:49   
Why not include them with this ?

extern "C" {
#include <caml/foo.h>
#include <caml/bar.h>
}
(0006088)
glondu   
2011-08-13 00:27   
The point is to avoid that. Whether "that" is better or not is a matter of taste, I guess. Maybe you have some arguments against extern "C" in caml headers?
(0006689)
lefessan   
2012-01-16 22:34   
Fixed in commit r12000 in the trunk.