0

I tried to make the program Delphi XE2 with dynamic runtime package. when I compile it no problem, but when on the run with F9 program just compiled and created exe file but it did not run. what is wrong with my configuration?

configuration that I use

  • Link with runtime package set True -- value from all configuration 32 bit windows platform set True

  • runtime package inherited set True

NB "When Link with runtime package" set to false, it can run normally.

  • there should be some diagnostics then. It can be some kind of DLL Hell (BPLs not found or wrong versions of those). Did you checked Delphi's Messages panel that there are no errors in it ? Basically you have two approaches: 1) use external tool like sysInternals Process Monitor to log your application start-up sequence and see what were last actions before its death. Maybe failed search for BPl or failed load or whatever. 2) set `Use Debug DCUs` in options and trace with F8 and F7 into the guts of RTL, seeing as it loads one BPl after another, narrowing your scope until error catched – Arioch 'The Apr 10 '13 at 06:33
  • I can't offer a solution. We had what sounds like the same experience after moving to XE2. We had to upgrade to get 64 bit capability for our server application, but suffered as we were unable to make our client side application work with BPL's loading dynamically. We had not had a problem with that prior to XE2 - it had been working for years without issue under previous versions. The work around was a to remove the need for BPL's, moving all functionality back into the main EXE. Not a proper solution, but it allowed us to use XE2. – Paul Apr 10 '13 at 06:54

1 Answers1

0

The behaviour you describe is what happens when the .bpl files cannot be found. if you run the .exe outside the IDE you will get an error message to that effect. For some reason that error message does not show when running from within the IDE. Note that it's not enough even to use the Run Without Debugging option. You have to start the executable outside the IDE, for example by double clicking on the .exe file in an explorer window.

Probably the most effective way to debug this to work out which dependencies are failing is with Dependency Walker. Load up your executable and debug its startup from the Profile menu.

Solve the problem by making sure that the .bpl files can be found. Make sure they are on the DLL search path. The best way to do that is to place them alongside the .exe file.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490