Number of classes in a project
John Dubchak
johndubchak at yahoo.com
Fri Feb 15 13:34:14 GMT 2002
No there is no limit. Currently I have approximately
75 classes in a particular project. The problem is in
whether or not you've defined the no args constructor
and destructor in the header file and provided their
definition in another translation unit - the .cpp
file.
I would assume that you have this scenario going on:
// rotate.h
class Rotate
{
public:
Rotate(); // no args constructor
~Rotate() // destructor
... // other stuff
};
// rotate.cpp
// you need these defined here now
// but I bet they aren't
Rotate::Rotate()
{
...
}
Rotate~Rotate()
{
}
Good luck and hope that helps,
John
--- Phil <phil at spiderweb.com.au> wrote:
> Hello All,
>
> I have developed a project that consists of 5
> classes which works as it
> should. If I add an extra class then I end up with a
> very strange error.
>
> This is a clip from the class that causes the error
> message:
>
> #include "rotate.h"
>
> Rotate rotate;
> rotate.setAngle();
>
> This file compiles without any errors but I get the
> following error when I
> attempt to run the application:
>
> /home/phil/pesc/pesc/pesc.cpp:159: undefined
> reference to
> `Rotate::Rotate(void)'
> /home/phil/pesc/pesc/pesc.cpp:159: undefined
> reference to
> `Rotate::~Rotate(void)'
>
> This error only occurs when a project has more than
> 5 classes and the rotate
> class works correctly in a two-class project. Is
> there a limit to the number
> of classes that a project can have?
>
> I'm using Kdevelop 2.0.1 and KDE 2.2.1.
>
> Any suggestions would be most appreciated.
>
> --
> Regards,
> Phil
> phil at spiderweb.com.au
>
> -
> to unsubscribe from this list send an email to
> kdevelop-request at kdevelop.org with the following
> body:
> unsubscribe »your-email-address«
__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail
http://mail.yahoo.com
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list