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: Compiling, Linking, Debugging of your packages » error: expected class-name before '{' token
error: expected class-name before '{' token [message #12934] Thu, 29 November 2007 13:42 Go to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Env: Win XP, Upp 2007.1
Hi,

I have a package i build which is composed by:
Px.h
main.cpp
Px.lay

I compile it and every thing goes fine. Now I would like to create another class for the project, so I created the files
Py.h and Py.cpp using notepad and then I added these to files to the Px package using the option "Insert PAckage Directory File(s)"

The contents of the py.h are:

#ifndef _Px_Py_h
#define _Px_Py_h

#include <Core/Core.h>
#include <CppBase/CppBase.h>
using namespace Upp;
class CPy: public TabCtrl
{
public:
typedef CPy CLASSNAME;
CPy();

};
#endif

The contents of the Py.cpp file are:

#include "Py.h"
CPy::CPy()
{

}


When I compile the project the following error appears:

Py.cpp
In file included from C:\Upp\MyApps\Px\Py.cpp:1:
C:/upp/uppsrc/CtrlLib/TabCtrl.h:1: error: expected class-name before '{' token
C:/upp/uppsrc/CtrlLib/TabCtrl.h:4: error: variable or field `Paint' declared void
C:/upp/uppsrc/CtrlLib/TabCtrl.h:4: error: `Paint' declared as a `virtual' field
...


If I remote the Py.cpp file from the package everything compiles well.

Any help?

Thanks you

Alex
Re: error: expected class-name before '{' token [message #12936 is a reply to message #12934] Thu, 29 November 2007 14:01 Go to previous message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Ok,

I forgot the #include <CtrlLib/CtrlLib.h>


Alex
Previous Topic: msdev 8.0 strange compiler error
Next Topic: Bugs in some package templates
Goto Forum:
  


Current Time: Mon Apr 29 14:06:55 CEST 2024

Total time taken to generate the page: 0.03514 seconds