Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation of generated .c files with g++ #5254

Closed
vicuna opened this issue Apr 24, 2011 · 2 comments
Closed

Compilation of generated .c files with g++ #5254

vicuna opened this issue Apr 24, 2011 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Apr 24, 2011

Original bug ID: 5254
Reporter: @glondu
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-07T17:20:27Z)
Resolution: fixed
Priority: high
Severity: minor
Version: 3.12.1+dev
Target version: 4.03.1+dev
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Related to: #8395 #4164 #4230 #6798
Monitored by: @whitequark mehdi

Bug description

C files generated by "ocamlc -output-obj" cannot be compiled with g++ because of multiple declarations. Attached is a patch that fixes that. Additionally, there is also a patch that fixes "deprecated conversion from string constant to 'char*'" warnings.

File attachments

@vicuna
Copy link
Author

vicuna commented Mar 16, 2015

Comment author: @damiendoligez

About the primitives: you shouldn't compile C files with a C++ compiler, as the two have incompatible calling conventions. Or you should wrap the C file in a
extern "C" { ... }
block.

About the "const char *", it was fixed some time ago.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

As far as I can see there is nothing further to be done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants