Workarounds for forward reference bugs

simendsjo simendsjo at gmail.com
Sat Oct 6 03:05:39 PDT 2012


On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:
> On 05/10/12 16:33, simendsjo wrote:
>> Are there any known workarounds for forward reference bugs?
>> I see 80 bugs is filed, but I don't want to read all of them 
>> to find any
>> workarounds. I cannot find anything on the wiki regarding this.
>>
>> So.. Any good ideas how to get around this?
>
> Those "forward reference" bugs have very little in common with 
> one another, other than the name. It's like "regressions".
> You'll need to be a little more specific.

import derelict.sfml2.graphics;

void main() {
     auto font = sfFont_createFromFile("");
     auto size = font.size; // Error: struct sfFont is forward 
referenced
}

$ rdmd -I\code\Derelict3\import forward_reference_bug
forward_reference_bug.d(5): Error: struct sfFont is forward 
referenced
Failed: "dmd" "-I\code\Derelict3\import" "-v" "-o-" 
"forward_reference_bug.d" "-I."


More information about the Digitalmars-d-learn mailing list