Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Undefined symbols: Display::Paint()
Undefined symbols: Display::Paint() [message #7003] |
Thu, 07 December 2006 04:10 |
lundman
Messages: 175 Registered: March 2006 Location: Tokyo
|
Experienced Member |
|
|
OsX IDE, 6011dev4. When compiling our application that works with 602 and 605 on NetBSD and Windows, I am getting a new problem of which I am uncertain as to how to fix.
Misc.h:
class RowDisplay : public Display{
Color fore;
Color back;
public:
void SetColors(Color f, Color b);
void Paint(Draw& w, const Rect& r, const Value& value,Color ink, Color paper,
dword s) const;
void PaintBackground(Draw& w, const Rect& r, const Value& value,Color ink, Col
or paper, dword s) const;
};
Misc.cpp
void RowDisplay::Paint(Draw& w, const Rect& r, const Value& value,
Color ink, Color paper, dword s) const
{
Display::Paint(w, r, value, fore, back, s);
}
void RowDisplay::PaintBackground(Draw& w, const Rect& r, const Value& value,
Color ink, Color paper, dword s) const
{
Display::PaintBackground(w, r, value, fore, back, s);
}
Will result in:
/usr/bin/ld: Undefined symbols:
Display::Paint(Draw&, Rect_<int> const&, Value const&, Color, Color, unsigned int) const
Note that the identical code calling PaintBackground works just fine. This is the only error, if I comment out Display::Paint line, it links and runs. But hard to use as it does not paint the lines correctly.
Draw/Display.h
virtual void PaintBackground(Draw& w, const Rect& r, const Value& q,
Color ink, Color paper, dword style) const;
virtual void Paint(Draw& w, const Rect& r, const Value& q,
Color ink, Color paper, dword style) const = 0;
Draw/Display.h defines both the same, except ::Paint has "= 0" at the end. (But no difference if I take that out).
Any clues?
Is the Rect_<int> causing the issue?
Lund
|
|
|
Re: Undefined symbols: Display::Paint() [message #7005 is a reply to message #7003] |
Thu, 07 December 2006 05:12 |
|
mirek
Messages: 14039 Registered: November 2005
|
Ultimate Member |
|
|
I believe this is already fixed (in 612dev1)
It was caused by adding alignment, which required to use specific class for StdDisplay, not Display. But that uncessarily broken compatibility and made Display unusuable, so I have returned original behaviour (Display::Paint is defined as StdDisplay().Paint...)
Mirek
[Updated on: Thu, 07 December 2006 05:12] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:05:38 CEST 2024
Total time taken to generate the page: 0.03964 seconds
|