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 » U++ Library support » U++ Library : Other (not classified elsewhere) » different compiler produces different look? [SOLVED]
Re: different compiler produces different look? [message #5939 is a reply to message #5933] Wed, 25 October 2006 15:07 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
forlano wrote on Wed, 25 October 2006 08:53

luzr wrote on Wed, 25 October 2006 02:50

Definitely a bug, either in U++ or your code, most likely uninitialized variable somewhere.

Can you create a simple testcase package?

Mirek


After some investigation I discovered what may be a problem in my app.
I've one arrayctrl that uses Display in a file
struct FontDisplay : Display {
	virtual void Paint(Draw& w, const Rect& r, const Value& q,
		               Color ink, Color paper, dword style) const
	{	Font fnt = Courier(13).Bold(); //Font(q, r.Height() - 2);
		String txt = AsString(q);
	 	w.DrawRect(r, paper);
		w.DrawText(r.left + 2, r.top + (r.Height() - GetTextSize(txt, fnt).cy) / 2, txt, fnt, ink);
	}
};


Then in another file another arrayctrl use the almost identical Display

struct FontDisplay : Display {
	virtual void Paint(Draw& w, const Rect& r, const Value& q,
		               Color ink, Color paper, dword style) const
	{		
		Font fnt = Courier(14); //Font(q, r.Height() - 2);
		String txt = AsString(q);
	 	w.DrawRect(r, paper);
		w.DrawText(r.left + 2, r.top + (r.Height() - GetTextSize(txt, fnt).cy) / 2, txt, fnt, ink); 
	}
};

It seems that the two Display collides in some manner. In fact if I remove one of them the look is the same with both compiler. Otherwise it is different: With MSC8 both have BOLD font; with Mingw both haven't the BOLD font.
Have I use only one Display?

Is this explanation enough to let you to understand the problem? Otherwise I try to do the package.

Luigi



Definitely, this is the problem. Actually, this is rather a problem in C++ build process (non-U++ related). You simply cannot have to different classes with the same name. Surprisingly, there is some problem detecting this situation in linker (I am not quite sure why, Tom know that Smile.

Moral of the story: Class name clash is problem.

Mirek
 
Read Message BugFixedDead.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Export U++ project to Visual Studio
Next Topic: Topic and tpp files: are they compiled?
Goto Forum:
  


Current Time: Sat Jun 08 16:07:19 CEST 2024

Total time taken to generate the page: 0.02234 seconds