C++ Builder XE 5 Ghost component in BPL file

82 Views Asked by At

I have been haunted by this ghost problem for a long time. I have a component library that I wrote myself, containing some derived VCL components.

Whenever i try to run an application that uses this library (MyComponents.bpl), it will show this error: Error Message

Mbutton used to be one of the components in the library, but it has long obsolete and removed from the project.

I have checked all files (cpp and h files) in the MyComponents project, none of them has any reference to Mbutton.

The host application source code is not referring to this component as well.

And I have been very sure there is only one copy of MyComponents.bpl in my whole PC. (which is located in the folder where the application is uisng it.) There is no duplicate in Windows/System32.

Cleaning/Uninstalling the components library and recompiling/Re-installing it does not help.

Can anyone help me track down what's the cause of this ghost component problem, please? Many thanks.

1

There are 1 best solutions below

0
On

Ah, found the source of the problem... There is a MyComponents.LIB which is referencing Mbutton component. The compiler was complaining about MyComponents.BPL, so I was misleaded all the time.

Removed the reference to MyComponents.LIB in the cbproj file and gone with the problem. Just to be sure, I deleted the LIB file as well.

This PC wasn't my original development PC, it was used by my colleague who has resinged, and I took over the PC after my PC has broken down. Don't know why she took my BPL and convert it into LIB... sigh, problem solved, thanks anyway to all who helped.