-
Notifications
You must be signed in to change notification settings - Fork 23
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
C++ #26
Comments
Strangely enough I've just been investigating this for some code that we're planning to open source. Here's the landscape at the moment:
What I propose to do is:
|
are we committing to remain bug-compatible with those semantics, or is hsc2hs gonna "fix" this in a future version to apply the usual "rightmost flag overrides leftmost flags" convention? it's no big deal if it's fixed, just something that needs to be taken into account as then we need to version-gate this (i.e. the "put --cc at the end" thing) against hsc2hs' reported version in the lib:Cabal code defensively |
I have no strong feelings... obviously it's a lot of hassle to fix it, but if you feel motivated then go for it. |
This pull request adds |
You shouldn't need this though, if you've changed the driver from You can probably also use |
I actually use |
@roberth taught me that you can add |
@Gabriella439 Yep. That should be the case now, given the patches since this bug was filed. At the time, you couldn't override correctly because the argument order caused the things asserted by cabal to override. We now have hsc2hs-options (haskell/cabal#6295) and they should properly override (#35) unlike back then. I'd still like a clearer ability to mix and match c and c++ hsc2hs in the same library though. |
This project is so close to being equally suitable for C++ development.
The problem seems to be just that there is no good way to indicate other than changing the compiler that the generated source should be treated as c++ rather than c.
Something like handling
.hscc
and having that produce a_hscc.cc
file, and feeding it to a c++ compiler would basically be enough.The text was updated successfully, but these errors were encountered: