Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
lundman is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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

Re: Undefined symbols: Display::Paint() [message #7007 is a reply to message #7005] Thu, 07 December 2006 05:15 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

So, wait for 611dev5 release? Or do you have a patch I can apply so I can compile and use our application Smile

Re: Undefined symbols: Display::Paint() [message #7008 is a reply to message #7007] Thu, 07 December 2006 07:01 Go to previous messageGo to next message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

heh ok, THIS time I read what you said..

Guess I try the porting thing in 612dev1..

but hey, I'm getting good at it.

Re: Undefined symbols: Display::Paint() [message #7019 is a reply to message #7008] Fri, 08 December 2006 03:51 Go to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member

Confirmed fixed. Thanks.

Previous Topic: Windows Service?
Next Topic: Multiline text display
Goto Forum:
  


Current Time: Thu Mar 28 17:51:04 CET 2024

Total time taken to generate the page: 0.00786 seconds