Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RLINK32: Error opening file "...\Data.DFM". Occurs the first time I build a project after opening Delphi

Tags:

delphi

I get this error the first time I build/compile a particular project after opening Delphi (D6 Pro). Subsequent builds do not give the error.

like image 330
soid Avatar asked Jun 19 '10 11:06

soid


2 Answers

I have the same issue, it was fixed by replacing {$R *.dfm} directive in the problem unit (which was not found by Delphi during first compilation) by more specific clause {$R fMain.dfm}.

like image 166
user2462865 Avatar answered Oct 19 '22 20:10

user2462865


The error can be caused by an exception being raised in a design component on the form. If the component is running some initialisation code which raises an exception this error will be produced. This can be shown by adding

raise Exception.CreateFmt('Test', []);

into the code of the component. Note that in D6 Pro this does not produce 'Test' in the error message. The underlying exception message is not displayed.

like image 44
soid Avatar answered Oct 19 '22 20:10

soid