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++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » 606-dev3 compile error with iml
606-dev3 compile error with iml [message #3761] Fri, 23 June 2006 08:51 Go to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I'm getting error message from compiler confined in the iml package. For example: the example package "iml" gives (under MSC8):
C:\upp\reference\iml\image.cpp(11) : error C2228: left of '.GetSize' must have class/struct/union
        type is ''unknown-type''
C:\upp\reference\iml\image.cpp(11) : error C3861: 'Smiley': identifier not found
C:\upp\reference\iml\image.cpp(12) : error C3861: 'Smiley': identifier not found

My application doesn't compile with error:
C:\upp\uppsrc\Draw/iml_source.h(22) : error C2653: 'IMAGECLASS' : is not a class or namespace name
C:\upp\uppsrc\Draw/iml_source.h(23) : error C2653: 'IMAGECLASS' : is not a class or namespace name
C:\upp\uppsrc\Draw/iml_source.h(23) : error C2065: 'COUNT' : undeclared identifier
C:\Vega\Vega5/Vega.iml(32) : error C2078: too many initializers

The previous version compiled very good. Any idea?
Luigi
Re: 606-dev3 compile error with iml [message #3762 is a reply to message #3761] Fri, 23 June 2006 09:31 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
[quote title=forlano wrote on Fri, 23 June 2006 08:51]
After adding a
#define IMAGECLASS Vega5Img
(that was not necessary in the previous version) my application removed the previous error and gives:
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgYes': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgNo': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgMaybe': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(89) : error C2228: left of '.GetSize' must have class/struct/union
        type is ''unknown-type''
C:\Vega\Vega5\VegaTab1.cpp(89) : error C2228: left of '.cy' must have class/struct/union
C:\Vega\Vega5\VegaTab1.cpp(89) : error C3861: 'imgYes': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(129) : error C2065: 'female' : undeclared identifier
C:\Vega\Vega5\VegaTab1.cpp(129) : error C2065: 'male' : undeclared identifier

In particular seems that the error is localized in .GetSize. Moreover there is a problem with the identifier. Maybe the API changed?
Luigi

[Updated on: Fri, 23 June 2006 09:40]

Report message to a moderator

Re: 606-dev3 compile error with iml [message #3763 is a reply to message #3762] Fri, 23 June 2006 09:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12106
Registered: November 2005
Ultimate Member
[quote title=forlano wrote on Fri, 23 June 2006 03:31]
forlano wrote on Fri, 23 June 2006 08:51


After adding a
#define IMAGECLASS Vega5Img
(that was not necessary in the previous version) my application removed the previous error and gives:
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgYes': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgNo': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(49) : error C3861: 'imgMaybe': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(89) : error C2228: left of '.GetSize' must have class/struct/union
        type is ''unknown-type''
C:\Vega\Vega5\VegaTab1.cpp(89) : error C2228: left of '.cy' must have class/struct/union
C:\Vega\Vega5\VegaTab1.cpp(89) : error C3861: 'imgYes': identifier not found
C:\Vega\Vega5\VegaTab1.cpp(129) : error C2065: 'female' : undeclared identifier
C:\Vega\Vega5\VegaTab1.cpp(129) : error C2065: 'male' : undeclared identifier

In particular seems that the error is localized in .GetSize. Maybe the API changed?
Luigi


I am sorry, but yes. CLASSNAME is now required. Please check whether you have not forgot to place Vega5Img:: before images,
like Vega5Img::imgYes.

BTW, I couldadd patch to keep CLASSNAME-less images working, however, this would not play well with recent development (each iml CLASSNAME now has corresponding object wrapper etc..).

Mirek
Re: 606-dev3 compile error with iml [message #3764 is a reply to message #3763] Fri, 23 June 2006 09:55 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
luzr wrote on Fri, 23 June 2006 09:37



I am sorry, but yes. CLASSNAME is now required. Please check whether you have not forgot to place Vega5Img:: before images,
like Vega5Img::imgYes.


I've added Veg5Img:: before my image and the complains were reduced. Still remains problem here:
	Size isz = Vega5Img::imgYes.GetSize(); 

"C:\Vega\Vega5\VegaTab1.cpp(23) : error C2228: left of '.GetSize' must have class/struct/union"

it is the same problem of the reference example. It seems .GetSize disappeared as method.

Luigi
Re: 606-dev3 compile error with iml [message #3765 is a reply to message #3764] Fri, 23 June 2006 10:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12106
Registered: November 2005
Ultimate Member
forlano wrote on Fri, 23 June 2006 03:55

luzr wrote on Fri, 23 June 2006 09:37



I am sorry, but yes. CLASSNAME is now required. Please check whether you have not forgot to place Vega5Img:: before images,
like Vega5Img::imgYes.


I've added Veg5Img:: before my image and the complains were reduced. Still remains problem here:
	Size isz = Vega5Img::imgYes.GetSize(); 

"C:\Vega\Vega5\VegaTab1.cpp(23) : error C2228: left of '.GetSize' must have class/struct/union"

it is the same problem of the reference example. It seems .GetSize disappeared as method.

Luigi


	Size isz = Vega5Img::imgYes().GetSize(); 


Paranthesis!!!

But they were required before too here...

Mirek
Re: 606-dev3 compile error with iml [message #3768 is a reply to message #3765] Fri, 23 June 2006 13:36 Go to previous message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
luzr wrote on Fri, 23 June 2006 10:29


Paranthesis!!!

But they were required before too here...

Mirek


Opsss... but it worked with the previous release so I was not aware of it. Here is the code of the package "iml" in the reference example coming with the distro. Now it works (Added define IMAGECLASS and iml:: everywhere.
Thanks,
Luigi

#include <CtrlLib/CtrlLib.h>

#define IMAGECLASS    iml 
#define  IMAGEFILE <iml/image.iml>
#include <Draw/iml.h>

struct App : TopWindow {
	void Paint(Draw& w)
	{
		Size sz = GetSize();
		w.DrawRect(sz, SGray);
		Size isz = iml::Smiley().GetSize();
		w.DrawImage((sz.cx - isz.cx) / 2, (sz.cy - isz.cy) / 2, iml::Smiley());
	}
	
	App()
	{
		Sizeable();
		BackPaint();
	}
};

GUI_APP_MAIN
{
	App().Run();
}
Previous Topic: upp-b605-dev1 compile error in PDFDraw
Next Topic: SVN rev. 24 chameleon related build error
Goto Forum:
  


Current Time: Sat Nov 23 00:00:11 CET 2019

Total time taken to generate the page: 0.01395 seconds