I have a VCL Forms app that includes a reference to a BPL file that I created. I added the unit name of a frame component from the BPL to the uses clause of the main window of the VCL app. The app builds fine, but when I run it, it dies before reaching the first line " Application.Initialize" in the project file. If I comment out the frame's unit from the uses clause, the app starts up and runs fine.
What could be causing the fatal error as the app starts up?
I'm guessing there is a problem with loading the BPL file on startup, but I'm having trouble finding the issue. Thank you.
More info below... The VCL app is in XE5 and I am trying to convert it into a BPL. The entire app resides in a single TFrame control which houses many other buttons and frames that give access to all of the underlying functionality of the app. This "main frame" is then placed in the main form of the app which is empty except for a few menu items. The original app builds and runs fine.
I created a new BPL project, and added this "main frame" component in an effort to create a BPL package that was essentially my entire app, and that could be used for a normal stand-alone exe app like before, or be added to a RemObjects Hydra plugin module, and ultimately be embedded into a C# app. The BPL project with the single "main frame" component builds okay with no errors.
I then created a new VCL Forms app with a single empty main form, and set the Project's "Options->Packages->Run-time Packages" to include my new BPL, and checked-off the "Link with run-time packages" option. I added the "main frame's" unit to the uses clause of the main form, and everything builds without errors.
The problem: When I run the app from XE5, it appears to begin to start-up as normal, but it dies before ever reaching the very first line of code "Application.Initialize;" in the project file. Note that I haven't written any code yet to create an instance of the "main frame" housed in the BPL. I've only added its unit to the uses clause. No error messages are shown, and nothing is posted to the Build or Output windows in XE5. If I comment out the "main frame's" unit from the uses clause, then the app runs fine, and the empty main window is shown.
Note: The app uses JVcl, NativeXml, TsiLang, ZipForge, & FastReports.