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

Make ocamlc -c recognize .cpp files #6798

Closed
vicuna opened this issue Mar 1, 2015 · 8 comments
Closed

Make ocamlc -c recognize .cpp files #6798

vicuna opened this issue Mar 1, 2015 · 8 comments

Comments

@vicuna
Copy link

vicuna commented Mar 1, 2015

Original bug ID: 6798
Reporter: @whitequark
Status: acknowledged (set by @damiendoligez on 2015-04-21T15:29:27Z)
Resolution: open
Priority: normal
Severity: feature
Category: compiler driver
Duplicate of: #5823
Related to: #5254
Monitored by: @ygrek @hcarty

Bug description

Currently a horrible workaround is needed: https://stackoverflow.com/questions/21728826/building-c-code-with-ocamlbuild

Telling ocamlc to treat .cpp files by passing them to $(BYTECC) together with -x cpp option (overridable default at configure time) seems much better.

The commands to link the standard library (like -lstdc++) could also be present in Makefile.config / Config.ml, so that user code would not have to replicate detection in every package.

@vicuna
Copy link
Author

vicuna commented Mar 2, 2015

Comment author: @ygrek

related #5823
Same wish - consider .cxx and .cc also

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 11, 2020
@whitequark
Copy link
Member

Still an issue.

@stedolan stedolan removed the Stale label May 12, 2020
@ygrek
Copy link
Contributor

ygrek commented May 15, 2020

I think first step is simple - just treating file extensions as C source - and then it will be user responsibility to make C compiler actually a c++ compiler (e.g. via -ccopt -xc++)
The second part - detecting c++ compiler in configure and supplying -lstdc++ is more involved, so can be left for later (moreover c++ is not required by ocaml build itself, so it will raise more questions)

@github-actions
Copy link

github-actions bot commented Jun 2, 2021

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Jun 2, 2021
@ygrek
Copy link
Contributor

ygrek commented Jun 2, 2021

Still want :)

@xavierleroy
Copy link
Contributor

Still want :)

I'm afraid you'll have to submit a PR yourself, since nobody else seems to care.

@github-actions github-actions bot removed the Stale label Jun 4, 2021
@github-actions
Copy link

github-actions bot commented Jul 4, 2022

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Jul 4, 2022
@github-actions github-actions bot closed this as completed Aug 3, 2022
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

5 participants