Cannot compile C file using ImportC

Steven Schveighoffer schveiguy at gmail.com
Wed Nov 10 15:06:26 UTC 2021


On 11/10/21 1:31 AM, rempas wrote:
> On Tuesday, 9 November 2021 at 19:34:44 UTC, Stefan Koch wrote:
>>
>> What's happening here is that dmd seems to see `free` as function 
>> rather than a pointer to a function.
>> changing `static void* (*ppmalloc)(size_t) = malloc;`
>> to `static void* (*ppmalloc)(size_t) = &malloc;`
>>
>> may solve your issue.
> 
> Thanks for the answer but this seems to create even more bugs

It shouldn't.

Perhaps you mean that you get more errors if you fix that situation? A 
compiler typically has phases where it can error out. This means that it 
might not get to further errors (or further errors are happening because 
of prior errors). It doesn't mean the later errors aren't there, it's 
just that the compiler gives up before finding them.

-Steve


More information about the Digitalmars-d-learn mailing list