Workarounds for forward reference bugs
simendsjo
simendsjo at gmail.com
Sat Oct 6 03:11:53 PDT 2012
On Saturday, 6 October 2012 at 10:17:34 UTC, simendsjo wrote:
> 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."
On second thought.. I don't think this is a bug and rather my
fault.
sfFont is just defined as "struct sfFont;", so there are no
fields.
Everything is accessed through functions.
My bad :/
More information about the Digitalmars-d-learn
mailing list