Linker error with Builder 12 and FastReports

TwineCompile - Cut C++Builder compile times by up to 50x!
Post Reply
Daytona675x
Posts: 13
Joined: Tue Oct 05, 2021 4:48 am
Contact:

Linker error with Builder 12 and FastReports

Post by Daytona675x »

When (and only when) I enable TwineCompile with Builder 12, linking of the most simple possible 64bit project with FastReport 2023.3 fails with the message:

[Linker Error] CodeGear.Cpp.Targets(4010, 5): Fatal: Unable to open file 'FRCORECLASSES.O'

Steps to reproduce:
- create a fresh new VCL Forms app
- drop a TfrxReport component on the form
- save and build

When I disable TwineCompile it links.
Additional info:
- I have 11.3 installed in parallel.
- TwineCompile was not installed through GetIt but manually using the latest installer from my account here, for both Builder 11.3 and 12.
jomitech
Site Admin
Posts: 2175
Joined: Wed Oct 08, 2008 12:23 am

Re: Linker error with Builder 12 and FastReports

Post by jomitech »

That is interesting. Couple things:

- Can you try adding the library path to that .o file manually into the project and seeing if that works? (in which case it's an implicit path that's not being added by MSBuild)

- Can you send the linker command line used without TwineCompile (From the Output window in the IDE), and with TwineCompile (from the Console Output in the compile window). The difference may give some clues
Jon
Daytona675x
Posts: 13
Joined: Tue Oct 05, 2021 4:48 am
Contact:

Re: Linker error with Builder 12 and FastReports

Post by Daytona675x »

Thanks for that quick response. Yes, weird stuff indeed.

1. "Can you try adding the library path to that .o file manually into the project and seeing if that works?"

The thing is, for that 64bit windows build there's no such file in the FastReport-2023.3 folders...
There is however a frCoreClasses.dcu
The path to the really existing FastReport .a files necessary for that clang 64 build is inside the linker parameters anyway, of course (and that dcu is in that same path, so I don't have any directory to add).

2. "Can you send the linker command line used with / without TwineCompile..."

Unfortunately I cannot spot any difference here.

This is without TwineCompile:

Code: Select all

c:\program files (x86)\embarcadero\studio\23.0\bin\ilink64.exe -G8 -L.\Win64\Debug;"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\release\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64;"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\FMX\Win64";C:\Users\Public\Documents\Embarcadero\Studio\23.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64 -j.\Win64\Debug;"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\release\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64;"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\FMX\Win64";C:\Users\Public\Documents\Embarcadero\Studio\23.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64 -l.\Win64\Debug -v -Gn -GA"B:\Temp\vfs5CFA.tmp"="Z:\Test\Unit2.dfm" -aa -Tpe c0w64w memmgr.a sysinit.o .\Win64\Debug\Project1.o .\Win64\Debug\Unit2.o , .\Win64\Debug\Project1.exe , .\Win64\Debug\Project1.map , rtl.a vcl.a frCoreLibrary29.a frx29.a frLocalizationLibrary29.a vclx.a frGraphicsLibrary29.a vclimg.a fs29.a import64.a cp64mt.a , , .\Win64\Debug\Project1.res 
And this is with TwineCompile:

Code: Select all

c:\program files (x86)\embarcadero\studio\23.0\bin\ilink64.exe -G8 -L.\Win64\Debug;"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\release\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64;"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\FMX\Win64";C:\Users\Public\Documents\Embarcadero\Studio\23.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64 -j.\Win64\Debug;"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\release\DE";"c:\program files (x86)\embarcadero\studio\23.0\lib\Win64\debug";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release";"c:\program files (x86)\embarcadero\studio\23.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64;"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\VCL\Win64";"C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\FastReport-2023.3\RS29\FMX\Win64";C:\Users\Public\Documents\Embarcadero\Studio\23.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp\Win64 -l.\Win64\Debug -v -Gn -GA"B:\Temp\vfs5CFA.tmp"="Z:\Test\Unit2.dfm" -aa -Tpe c0w64w memmgr.a sysinit.o .\Win64\Debug\Project1.o .\Win64\Debug\Unit2.o , .\Win64\Debug\Project1.exe , .\Win64\Debug\Project1.map , rtl.a vcl.a frCoreLibrary29.a frx29.a frLocalizationLibrary29.a vclx.a frGraphicsLibrary29.a vclimg.a fs29.a import64.a cp64mt.a , , .\Win64\Debug\Project1.res 
jomitech
Site Admin
Posts: 2175
Joined: Wed Oct 08, 2008 12:23 am

Re: Linker error with Builder 12 and FastReports

Post by jomitech »

Can you try uninstalling the FastReports GetIt package and installing it directly from their site? I downloaded it from their site, installed into a clean IDE, installed TwineCompile, and had no issues with linking.
Jon
Daytona675x
Posts: 13
Joined: Tue Oct 05, 2021 4:48 am
Contact:

Re: Linker error with Builder 12 and FastReports

Post by Daytona675x »

I only see some trial versions on the FastReport homepage, no installer that matches what you get through GetIt so I didn't try so far.

Did you experience issues with the GetIt version yourself?
Ultimately it seems to be a weird issue with TwineCompile because it works with C++ Builder's std. linker mechanics.

In the meantime I tried some more stuff (e.g. debug vs release, static vs dynamic link, 32bit build etc.), no difference (well, for the 32bit build TwineCompile's linking stage complains about missing "frcoreclasses.obj" instead of ".o", naturally).

Anybody else here who can reproduce this?
Daytona675x
Posts: 13
Joined: Tue Oct 05, 2021 4:48 am
Contact:

Re: Linker error with Builder 12 and FastReports

Post by Daytona675x »

Okay, because we all know what a pile of bugs C++ Builder became over the last decade or so, I simply did the following:

First I uninstalled and reinstalled the FastReport GetIt package.
Then I tried to build the project - with no success again.

And then I did the same thing as yesterday, I created a fresh new default VCL forms project and dropped a frxReport component on it and tried again. And suddenly it works :shock:

Unfortunately I overwrote the old project in the process so I cannot check for differences in the project file.

Okay, so no issue with TwineCompile at all, just another wild C++ Builder weirdness :roll:
Thanks for looking into it and sorry for wasting your time, Jon!
jomitech
Site Admin
Posts: 2175
Joined: Wed Oct 08, 2008 12:23 am

Re: Linker error with Builder 12 and FastReports

Post by jomitech »

Wow, that's weird. Glad it's resolved though. Thanks for the update!
Jon
Post Reply