Re: Does betterC work different on windows and linux?

2019-11-14 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 14 November 2019 at 16:47:59 UTC, kinke wrote: The -betterC for that app doesn't imply that its dependencies are compiled with -betterC too. So either also specify that flag in your library's dub config, or build the app with `DFLAGS=-betterC dub ...`. Thank you, I added some

Re: Does betterC work different on windows and linux?

2019-11-14 Thread kinke via Digitalmars-d-learn
On Thursday, 14 November 2019 at 16:34:07 UTC, Ferhat Kurtulmuş wrote: I could also run the code in that way. Probably I have some problems with dub configurations. I get linking errors when I try to import the library in a newly created dub project, although there is "dflags": ["-betterC"] in

Re: Does betterC work different on windows and linux?

2019-11-14 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Thursday, 14 November 2019 at 16:12:19 UTC, kinke wrote: I can't reproduce this with LDC 1.17.0, after changing `unittest` to `extern (C) int main()` and returning 0 at the end; compiled & linked with `ldc2 -betterC stringnogc.d`. I could also run the code in that way. Probably I have some

Re: Does betterC work different on windows and linux?

2019-11-14 Thread kinke via Digitalmars-d-learn
I can't reproduce this with LDC 1.17.0, after changing `unittest` to `extern (C) int main()` and returning 0 at the end; compiled & linked with `ldc2 -betterC stringnogc.d`.

Does betterC work different on windows and linux?

2019-11-14 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
I was trying to make my stupid writeln2 function (https://github.com/aferust/stringnogc/blob/master/source/stringnogc.d) compatible with betterC. writeln2() calls obParse() function which may contain some code incompatible with betterC. However; while the code in the unittest can be compiled and