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 |
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
|
|
|
|
Goto Forum:
Current Time: Thu May 16 19:54:42 CEST 2024
Total time taken to generate the page: 0.02465 seconds
|