Strange stack variable corruption error after calling extern(C) function
Benjamin Thaut via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 3 05:48:37 PDT 2016
On Tuesday, 3 May 2016 at 11:32:31 UTC, cc wrote:
> Hello, I've been encountering a strange problem that seems to
> occur after calling some external C functions. I've been
> working on a program that incorporates the FMOD C API for
> playing sound, with a simple D binding based off the C headers,
> and actually everything works more or less fine, I've had
> working sound in my program for a few months now. However I
> recently started noticing some strange behavior, currently
> using DMD v2.070.2 (haven't tried v2.071 yet, will soon). I
> can't post the entire program but I'll include the relevant
> code, I might try to make a small working compilable sample if
> this isn't enough information.
>
> [...]
It seems that one of the fmod functions you declared is not
correct. Either the fmod api is not using the c calling
convention or you made a mistake when declaring the paramters of
the fmod functions. You should double check that the functions
match the fmod headers.
Kind Regards
Benjamin Thaut
More information about the Digitalmars-d-learn
mailing list