2

我想在 Tizen 平台的表单上添加背景图像。我有以下两个课程:

头等舱:

class BaseForm1
: public Tizen::Ui::Controls::Form
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::Controls::IFormBackEventListener
{
public:
BaseForm1();
virtual ~BaseForm1();

    virtual bool Initialize(void) = 0;
    virtual result OnInitializing(void);
    bool SetFooter(void);
    virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
    virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source) ;

protected:
    static const int ID_EXIT = 100;
};

第二类:

class CreateForm1:
public BaseForm1,
public Tizen::Ui::IItemEventListener

{

protected:


public:
CreateForm1();
virtual ~CreateForm1();
virtual bool Initialize(void);
virtual result OnInitializing(void);
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
virtual void OnItemStateChanged(const Tizen::Ui::Control& source, int index, int itemId, Tizen::Ui::ItemStatus status);
virtual result OnDraw(void);
};

在第二堂课中,我BaseForm1::OnInitializing()在方法中使用OnInitializing(void)方法。第二类继承第一类(BaseForm1)。我使用OnDraw()方法来绘制背景图像。

但显示此错误:

./src/CreateForm1.o:(.data.rel.ro+0x4c): undefined reference to `CreateForm1::OnDraw()'
collect2: ld returned 1 exit status
clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see    invocation)

此链接很有帮助,但我的代码不起作用。您的宝贵答案会有所帮助。

4

0 回答 0