Skip to content

Make ocamlc -c recognize .cpp files #6798

Description

@vicuna

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions