Witam
Mam taki problem: tworze wlasny komponent:
plik Html1.h:
class PACKAGE Html : public TComponent
{
private:
TStringList plik;
protected:
public:
__fastcall Html(TComponent Owner);
void setFileContent(TStringList *file);
__published:
};
plik Html1.cpp:
static inline void ValidCtrCheck(Html )
{
new Html(NULL);
}
__fastcall Html::Html(TComponent Owner)
: TComponent(Owner)
{
}
namespace Html1
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(Html)};
RegisterComponents("Standard", classes, 0);
}
}
void Html1::setFileContent(TStringList *file)
{
}
Nastepnie po dodaniu komponentu (Html1) do formularza oraz wywolaniu funkcji:
Html1->SetFileContent(plik) otrzymuje blad:
Unresolved external 'Html::setFileContent(Classes::TStringList *) referenced from...
Ktos wie co jest grane? Oczywiscie formularz includuje plik naglowkowy Html1.h. Jesli funckja jest zdefiniowana w ciele klasy to wszystko jest ok a jesli w pliku Html1.cpp to cos nie gra.