digitalmars.D - ImportC and .h files
- Walter Bright (7/7) Jan 10 2023 Many have mentioned on the n.g. that ImportC wasn't working with this or...
- bachmeier (6/14) Jan 11 2023 This one filed by Adam blocks most large C programs from
- Walter Bright (3/5) Jan 11 2023 Thanks. I need reproducible test case, there's too much guesswork neede...
- bachmeier (23/28) Jan 12 2023 The [new bug referenced in this
- Krzysztof =?UTF-8?B?SmFqZcWbbmljYQ==?= (6/14) Jan 12 2023 On Linux anything which includes math.h or uses the assert macro
- =?UTF-8?Q?Ali_=c3=87ehreli?= (4/5) Jan 12 2023 Yesterday, I identified 2 issues with subjects starting with ImportC. I
Many have mentioned on the n.g. that ImportC wasn't working with this or that .h file. So I've been looking at bugzilla for issues pertaining to that. Pretty much they are contributions from Jacob Carlborg. I'm halfway through fixing those. But what about yours? I can't fix non-specific things like "doesn't work with h files". Help me help you by filing bugzilla issues! Please tag them with the "ImportC" keyword.
Jan 10 2023
On Wednesday, 11 January 2023 at 02:59:49 UTC, Walter Bright wrote:Many have mentioned on the n.g. that ImportC wasn't working with this or that .h file. So I've been looking at bugzilla for issues pertaining to that. Pretty much they are contributions from Jacob Carlborg. I'm halfway through fixing those. But what about yours? I can't fix non-specific things like "doesn't work with h files". Help me help you by filing bugzilla issues! Please tag them with the "ImportC" keyword.This one filed by Adam blocks most large C programs from compiling: https://issues.dlang.org/show_bug.cgi?id=23402 A single function definition or enum imported in two places within the same program prevents compilation.
Jan 11 2023
On 1/11/2023 4:18 AM, bachmeier wrote:A single function definition or enum imported in two places within the same program prevents compilation.Thanks. I need reproducible test case, there's too much guesswork needed on my part in the bug report.
Jan 11 2023
On Thursday, 12 January 2023 at 06:30:15 UTC, Walter Bright wrote:On 1/11/2023 4:18 AM, bachmeier wrote:The [new bug referenced in this thread](https://issues.dlang.org/show_bug.cgi?id=23622) indicates that this is probably specific to including math.h. I added a comment to the bug report, but here's the full test case: foo.c ``` #include <math.h> int main() {} ``` Compiles with gcc. DMD gives ``` #defines(797): Error: variable `foo.FP_NAN` conflicts with enum member `__anonymous.FP_NAN` at /usr/include/math.h(855) #defines(798): Error: variable `foo.FP_INFINITE` conflicts with enum member `__anonymous.FP_INFINITE` at /usr/include/math.h(858) #defines(799): Error: variable `foo.FP_ZERO` conflicts with enum member `__anonymous.FP_ZERO` at /usr/include/math.h(861) #defines(800): Error: variable `foo.FP_SUBNORMAL` conflicts with enum member `__anonymous.FP_SUBNORMAL` at /usr/include/math.h(864) #defines(801): Error: variable `foo.FP_NORMAL` conflicts with enum member `__anonymous.FP_NORMAL` at /usr/include/math.h(867) ```A single function definition or enum imported in two places within the same program prevents compilation.Thanks. I need reproducible test case, there's too much guesswork needed on my part in the bug report.
Jan 12 2023
On Wednesday, 11 January 2023 at 02:59:49 UTC, Walter Bright wrote:Many have mentioned on the n.g. that ImportC wasn't working with this or that .h file. So I've been looking at bugzilla for issues pertaining to that. Pretty much they are contributions from Jacob Carlborg. I'm halfway through fixing those. But what about yours? I can't fix non-specific things like "doesn't work with h files". Help me help you by filing bugzilla issues! Please tag them with the "ImportC" keyword.On Linux anything which includes math.h or uses the assert macro from assert.h fails to compile: - https://issues.dlang.org/show_bug.cgi?id=23622 - https://issues.dlang.org/show_bug.cgi?id=23509
Jan 12 2023
On 1/10/23 18:59, Walter Bright wrote:Please tag them with the "ImportC" keyword.Yesterday, I identified 2 issues with subjects starting with ImportC. I added the keyword to those issues. Ali
Jan 12 2023