digitalmars.D.learn - Workarounds for forward reference bugs
- simendsjo (5/5) Oct 05 2012 Are there any known workarounds for forward reference bugs?
- Don Clugston (4/8) Oct 05 2012 Those "forward reference" bugs have very little in common with one
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?
Oct 05 2012
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.
Oct 05 2012
On Friday, 5 October 2012 at 15:16:10 UTC, Don Clugston wrote:On 05/10/12 16:33, simendsjo wrote: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."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.
Oct 06 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 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 :/On 05/10/12 16:33, simendsjo wrote: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."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.
Oct 06 2012