开发者

Compilation error Problem with 10000 lines pas file in Delphi XE

开发者 https://www.devze.com 2023-02-21 07:07 出处:网络
I have a uni开发者_StackOverflow社区t with 10000 rows for which I already asked a question in the past.

I have a uni开发者_StackOverflow社区t with 10000 rows for which I already asked a question in the past.

Anyway the problem now is that I just migrated from 2009 to XE. And everytime I compile that unit (or build my application) I get an error:

[DCC Error] 10000linesuni.pas(452): E2029 ',' or ':' expected but identifier 'dxBarLargeButton17' found

The workaround is to do a dummy modification to the pas file (add a '.' and remove it). Now it will compile correctly.

Is this a known problem? Does anyone know a workaround?

Note: I didn't have this problem in Delphi 2009.

This is the code you can see that 452 is nothing special, just one of the components on the form:

BarManagerBar4: TdxBar;
dxBarLargeButton16: TdxBarLargeButton;
dxBarLargeButton17: TdxBarLargeButton;  // This is line 452
dxBarLargeButton18: TdxBarLargeButton;
dxBarLargeButton19: TdxBarLargeButton;
dxBarLargeButton20: TdxBarLargeButton;


user193655, as the advice in my comment helped you, I will post as answer to help someone in the future to resolve this issue.

Sometimes the compilation of one or more files is interrupted due to the existence of invalid characters in the source code or mismatched line endings (should be CR/LF). To fix this use a hex editor to track the invalid chars and delete from the source file, or in the case of the line endings, open the file in Notepad, and save it; this fixes the line endings correctly.

0

精彩评论

暂无评论...
验证码 换一张
取 消