Incomprehensible compiler errors

Bernard Helyer b.helyer at gmail.com
Mon Jul 30 17:28:07 PDT 2012


On Monday, 30 July 2012 at 23:40:02 UTC, Stuart wrote:
> On Monday, 30 July 2012 at 23:31:14 UTC, Andrei Alexandrescu 
> wrote:
>>
>> I empathize. The one thing that may be different is that the 
>> forums at forum.dlang.org tend to be a bit more responsive and 
>> to the point.
>
> Well, perhaps someone can explain why I can't compile DFL?

Compiling from here,

https://github.com/Rayerd/dfl

the problem is winapi.d, wincom.d utf.d (not internal\utf.d) are 
all obsolete, and won't compile. Remove those and don't use them 
in your code. Other than that, all I did was

     dmd -lib -ofdfl *.d internal/*.d -I..

 From win32/dfl in a MinGW bash shell, because DMD doesn't expand 
wildcards.

Then I tested my new dfl.lib with

import dfl.all;

int main()
{
         Form myForm;
         Label myLabel;

         myForm = new Form;
         myForm.text = "DFL Example";

         myLabel = new Label;
         myLabel.font = new Font("Verdana", 14f);
         myLabel.text = "Hello, DFL World!";
         myLabel.location = Point(15, 15);
         myLabel.autoSize = true;
         myLabel.parent = myForm;

         Application.run(myForm);

         return 0;
}

with

dmd test.d dfl.lib gdi32.lib ole32.lib oleaut32.lib comdlg32.lib 
comctl32.lib

This took me about two minutes to figure out with no prior 
experience with DFL.


More information about the Digitalmars-d mailing list