I'm working with Borland C++Builder 6 and 2010, and am having this problem. However, the difference here is that i'm using a FORM compiled inside the package, so, take the example above, but in addition I'm including a form class, like TForm2:
class TForm2 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
void __fastcall Button1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
So, when I'm trying to use this class in any project the linker stops and give me the unresolved external error.
When I got that error I tried to include the word PACKAGE, like this:
class PACKAGE TForm2
But, when I tried to compile the PACKAGE, the compiler stops with the unresolved external error:
[ILINK32 Error] Error: Unresolved external '__fastcall Forms::TCustomForm::~TCustomForm()' referenced from c:\projects\UNIT2.OBJ
How can I solve this problem?