digitalmars.D - Unexpected OPTLINK Termination [again]
- hemkond hotmail.com (51/51) Apr 18 2005 I'm reposting this, hopefully somebody has a clue. The following code
I'm reposting this, hopefully somebody has a clue. The following code causes the linker to crash with a "Unexpected OPTLINK Termination" message. 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. Also this was tested with versions 0.116-0.119. 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? Please help. Thanks, Mike.
Apr 18 2005