| |
| Posted by Mike in reply to Walter | PermalinkReply |
|
Mike
Posted in reply to Walter
| Walter wrote:
> I have no idea what is going wrong. Can you try and reduce it down?
>
>
I reduced it to the following: using the example that appears in http://www.dprogramming.com/dfl.php - the "classic Hello, world", and adding 2 lines (my lines are marked with comments before them):
//first change
import std.stream;
import dfl.all;
int main()
{
Form myForm;
Label myLabel;
//second change, this line is the one causing the linker error dialog-box
File conf = new File("junk.txt", FileMode.In | FileMode.Out);
myForm = new Form;
myForm.text = "DFL Example";
myLabel = new Label;
myLabel.text = "Hello, World";
myLabel.size = Size(100, 14);
myLabel.parent = myForm;
Application.run(myForm);
return 0;
}
If the File ctor line is commented-out, it compiles & runs.
As I mentioned, I'm using D version 0.120, DFL version 0.8.
The following line is used to compile the file:
dmd MainForm.d phobos.lib dfl.lib
Some further trimming brought it down to:
import std.stream;
import dfl.all;
int main()
{
Form myForm = new Form;
File conf = new File;
return 0;
}
which doesn't work, versus:
import std.stream;
import dfl.all;
int main()
{
Form myForm;
File conf = new File;
return 0;
}
which does.
What am I doing wrong?
Thanks,
Mike.
|