Error F2063: Could not compile used unit 'FrxClass.pas'

error F2063: Could not compile used unit 'FrxClass.pas’
I get the above error when trying to compile my project through FB 7.0.0.3202.  The project compiles correctly in the Delphi XE7 IDE.  Please let me know of any ideas why it would fail through FB but not in the IDE.

Thank you.

Hi Luke,

As when compiling inside the IDE, if the Delphi compiler used on the command line isn’t given all the information/paths it requires the application will not compile.

I would suggest looking at the settings you have provided in the Build Delphi action. Specifically the paths provided. If they don’t match the project settings then I would expected different results from building inside the IDE.

I have more details on this problem that I am hoping can be explained.

We are using the version of Fast Reports that comes with XE7 so it does not have the source code.

In the project I set the search path to include FastReports\LibD21 which is the XE7 version of FastReports and it compiles in the IDE without error. When I do the compile from FB it fails with the above error. However, if I change the search path to FastReports\LibD20 which is the XE6 version of FastReports it works fine in FB but the IDE then throws an error that it cannot compile the FrxClass.pas file.

So the only change is the search path in the project options as to which directory is set in the search path.

We also have FB set to use msbuild to do the builds so it can work from the .groupproj files to determine what to build. I have set the IDE to also use msbuild in the project options and it succeeds just like the regular IDE build so it does not appear to be a msbuild issue. I am wondering if perhaps FB is calling the wrong copy Delphi when calling the compiler since we have both XE6 and XE7 installed.

Thank you for the help.

I am sorry to have wasted your time on this. It turns out that one of the FB scripts we have contains a couple of variables that I did not know about that are needed due to using MSBuild. These variables contain the path to the bin folder for the Delphi bds.exe. I just needed to change them to point at the 15.0 rather than the 14.0 directory.

There was nothing wrong with FinalBuilder it was just a script error.

Thank you.

Hi Luke,

No worries, glad to hear everything is working.