C++ Builder XE7 project without runtime packages

For me it is not possible to link an C++ Builder XE7 64 bit program that uses FlexCel if the project is not linked with runtime packages. But my projects must not be linked with runtime packages.

The problem can be reproduced very simple.: Add in a form the following lines:

#include <Vcl.FlexCel.Core.hpp>
#include <FlexCel.XlsAdapter.hpp>
#include <FlexCel.Render.hpp>

Remove the check box for 'link with runtime packages' in the project options, that's it.

The error is:

[ilink64 Error] Fatal: Error detected (PDA453)

Is there a solution?

Markus Donath


Thanks for reporting this: Indeed, I've investigated it and the problem seems to be caused by the 
#pragma startup
#pragma exit

lines in FlexCel include files.
This seems to be a bug introduced in C++ builder xe7. If you search the hpp files in FlexCelVCLNT\Packages\dXE7\Win64\Release for #pragma startup and comment the lines along with #pragma exit (there are 5 lines like this in 5 files) it will compile. But of course it won't run properly, even when it will run. Some functionality like the ability to read and write encrypted files won't work. (but you could run those methods in #pragma startup at the start of your app anyway)

I'll keep investigating to see if I find a way to workaround this bug in C++ builder, but I can't think of many right now: If we can't use pragma startup then the only solution is to run those methods in app startup.

I'll keep you informed in what else I find.

Sorry about last post: while removing the pragmas will indeed make an empty file compile, when you write any code using FlexCel the error reappears. I'll keep investigating.

Yes, I have commented out these lines and the error remains.
Hoping there will be a solution.

I've tried a lot of other stuff but at the end I had to give up. For some reason ilink64 can't link FlexCel. For the time bien the only workaround is to build with FlexCel runtime packages for 64 bits.

We've contacted embarcadero about this bug in inlink64, I'll update here if we get any extra information.

Thanks a lot. I hope Embarcadero will find a solution.

Meanwhile I succeeded in compiling my project with runtime packages. The problem is, I have to deploy a lot of bpl-files, but this is ok.

The more serious problem is, the program (a service application) runs now perfectly on my computer where RAD-Studio is installed, but on another machine the program crashes immediately after start even though I copied all the bpl-files into the program directory. Any idea what could the problem here? On the other hand that might be not a problem with FlexCel.



Indeed, there are a lot of bpls to deploy.

About the crash in other machine, the most likely reason I can think is that some bpl is missing.

Have you tried looking at the event log in the machine where it works, as described here:

Maybe some bpl is missing? That would crash immediately the program after start.

The event log says:

Faulting application name: MySvcApp.exe, version:, time stamp: 0x00000000

Faulting module name: rtl210.bpl, version: 21.0.17707.5020, time stamp: 0x545bd0a6

Exception code: 0xc0000005

Fault offset: 0x0000000000018742

Faulting process id: 0x1360

Faulting application start time: 0x01d03622577350ad

Faulting application path: C:\MyServices\MySvcApp.exe

Faulting module path: C:\MyServices\rtl210.bpl

Report Id: 96fc962b-a215-11e4-82b5-00155d260315

Faulting package full name:

Faulting package-relative application ID:

And I copied all FlexCel bpl-file and all bpl- and dll-files from Embarcadero's bin64 directory to the program's directory on the other machine.

Could you test it with XE8?
I can't test it myself because FlexCel is not installable on RAD Sudio test versions.

Sorry, I've just checked it and the linker error is still there.

I really wish I could say more on this, but I don't know what else to do. We'll try to contact embarcadero again, to see if there are any advances.

Well, quite late, but just to let you know Embarcadero seems to have fixed the ilink problem in Berlin. I've just tried it, and it compiles fine in x64 without runtime packages.