digitalmars.D - Emitting C/C++ headers
- Manu (4/4) Feb 15 2020 Where are we at with this?
- Stefan Koch (3/9) Feb 16 2020 If I recall correctly you can throw the -Hc switch to generate c
- Manu (4/13) Feb 16 2020 Is available in releases? Should probably update the command line docs
- Manu (4/19) Feb 16 2020 2.90.1 doesn't accept -Hc
- Seb (6/30) Feb 16 2020 Of course, it has never been merged:
- MoonlightSentinel (5/10) Feb 19 2020 I revived the old PR in [1] to get an initial version merged.This
- Andre Pany (8/20) Feb 20 2020 What I do not understand, does this pr only takes care about C++
- MoonlightSentinel (12/16) Feb 20 2020 The generator currently creates C++ headers but maybe it could be
- Gregor =?UTF-8?B?TcO8Y2ts?= (11/17) Feb 19 2020 I would use that feature in a heartbeat. There is a lot of code
- Ahmet Sait (3/9) Feb 20 2020 It would be so much better if we could fix export attribute
- MoonlightSentinel (4/6) Feb 20 2020 Enhancing other aspects of C(++) interop is certainly beneficial.
- Manu (4/13) Feb 20 2020 Fix it in post. I have a bunch of PR's I want to make against this, so
Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.
Feb 15 2020
On Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.If I recall correctly you can throw the -Hc switch to generate c headers.
Feb 16 2020
On Sun, Feb 16, 2020 at 2:50 AM Stefan Koch via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Is available in releases? Should probably update the command line docs to mention it.Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.If I recall correctly you can throw the -Hc switch to generate c headers.
Feb 16 2020
On Sun, Feb 16, 2020 at 10:33 AM Manu <turkeyman gmail.com> wrote:On Sun, Feb 16, 2020 at 2:50 AM Stefan Koch via Digitalmars-d <digitalmars-d puremagic.com> wrote:2.90.1 doesn't accept -Hc 1> COMPILED : error : unrecognized switch '-Hc' 1> run `dmd` to print the compiler manualOn Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Is available in releases? Should probably update the command line docs to mention it.Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.If I recall correctly you can throw the -Hc switch to generate c headers.
Feb 16 2020
On Sunday, 16 February 2020 at 18:43:39 UTC, Manu wrote:On Sun, Feb 16, 2020 at 10:33 AM Manu <turkeyman gmail.com> wrote:Of course, it has never been merged: https://github.com/dlang/dmd/pull/9971 I think at this point it should just be merged as is, because otherwise no progress will ever happen. Once merged, it can be improved incrementally.On Sun, Feb 16, 2020 at 2:50 AM Stefan Koch via Digitalmars-d <digitalmars-d puremagic.com> wrote:2.90.1 doesn't accept -Hc 1> COMPILED : error : unrecognized switch '-Hc' 1> run `dmd` to print the compiler manualOn Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Is available in releases? Should probably update the command line docs to mention it.Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.If I recall correctly you can throw the -Hc switch to generate c headers.
Feb 16 2020
On Sunday, 16 February 2020 at 20:51:10 UTC, Seb wrote:Of course, it has never been merged: https://github.com/dlang/dmd/pull/9971 I think at this point it should just be merged as is, because otherwise no progress will ever happen. Once merged, it can be improved incrementally.I revived the old PR in [1] to get an initial version merged.This feature is certainly not perfect (yet) but further PRs should take care of that. [1] https://github.com/dlang/dmd/pull/10801
Feb 19 2020
On Wednesday, 19 February 2020 at 23:02:39 UTC, MoonlightSentinel wrote:On Sunday, 16 February 2020 at 20:51:10 UTC, Seb wrote:What I do not understand, does this pr only takes care about C++ or also C too? And the deficiencies you mentioned, are they only C++ related and what is the state on C header generation? Kind regards AndreOf course, it has never been merged: https://github.com/dlang/dmd/pull/9971 I think at this point it should just be merged as is, because otherwise no progress will ever happen. Once merged, it can be improved incrementally.I revived the old PR in [1] to get an initial version merged.This feature is certainly not perfect (yet) but further PRs should take care of that. [1] https://github.com/dlang/dmd/pull/10801
Feb 20 2020
On Thursday, 20 February 2020 at 08:24:12 UTC, Andre Pany wrote:What I do not understand, does this pr only takes care about C++ or also C too?The generator currently creates C++ headers but maybe it could be extended for pure C headers.And the deficiencies you mentioned, are they only C++ related and what is the state on C header generation?There are some remaining bugs / limitations: - Cannot create separate header files, only only big header (run dmd for each module instead) - some D features are not implemented yet - some D Features generate wrong headers - the header format could be improved That being said it‘s certainly usable and will probably improve a lot once people start contributing through PRs. PS: Refer to the dshell test in my PR for a runnable example.
Feb 20 2020
On Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.I would use that feature in a heartbeat. There is a lot of code that I would like to rather write in D for use in existing C++ codebases, but maintaining equivalent C++ interface headers is not my idea of fun, so I nix the idea again every time I think about it. I can't really take the top down approach where D provides the main program and calls into C++ libraries. So tools like dpp - despite being great little helpers - don't apply at all where it would matter most to me. So is there currently a block for the PR?
Feb 19 2020
On Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.It would be so much better if we could fix export attribute before this.
Feb 20 2020
On Thursday, 20 February 2020 at 17:18:28 UTC, Ahmet Sait wrote:It would be so much better if we could fix export attribute before this.Enhancing other aspects of C(++) interop is certainly beneficial. But there's no benefit in good work (that has already been done) going to waste in a stalled PR.
Feb 20 2020
On Thu, Feb 20, 2020 at 9:20 AM Ahmet Sait via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Sunday, 16 February 2020 at 03:53:47 UTC, Manu wrote:Fix it in post. I have a bunch of PR's I want to make against this, so it would be nice for this to merge asap.Where are we at with this? There was a flurry of activity last year, but did anything make it across the line? Is it present in the current release? I can't see any mention in the compiler reference.It would be so much better if we could fix export attribute before this.
Feb 20 2020