D
dave6502
Newbe C++ programmer.
I am trying to bug fix a simple KDE application that uses C++. There
is a main directory with .cpp & .h files in it. I need to write some
additional code and split it up into .cpp & .h files. The code - no
problem. The splitting into ,h & .cpp is the problem. Stripping the
problem to its very bare bones I have ...
ctallowdeny.h ...
/////////////////////////////////////////////////////////////////////
class ctallowdeny
{
public:
ctallowdeny();
~ctallowdeny();
}
/////////////////////////////////////////////////////////////////////////////
ctallowdeny.cpp ...
//////////////////////////////////////////////////////////////////////////////
#include "ctallowdeny.h"
using namespace std;
ctallowdeny::ctallowdeny() {};
ctallowdeny::~ctallowdeny() {};
///////////////////////////////////////////////////////////////////////
and called from KTApp with ...
#include "ctallowdeny.h"
ctallowdeny testbed
When I make I get ...
ktapp.o: In function `KTApp::KTApp()':
ktapp.cpp.text+0x28df): undefined reference to
`ctallowdeny::ctallowdeny()'
ktapp.cpp.text+0x2a4d): undefined reference to
`ctallowdeny::~ctallowdeny()'
ktapp.o: In function `KTApp::KTApp()':
ktapp.cpp.text+0x2b49): undefined reference to
`ctallowdeny::ctallowdeny()'
ktapp.cpp.text+0x2cc4): undefined reference to
`ctallowdeny::~ctallowdeny()'
collect2: ld returned 1 exit status
make[2]: *** [kcron] Error 1
make[2]: Leaving directory `/home/ubuntu/Desktop/kdeadmin-3.5.5/kcron'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/kdeadmin-3.5.5'
make: *** [all] Error 2
ubuntu@ubuntu-desktop:~/Desktop/kdeadmin-3.5.5$
//////////////////////////////////////////////////////////////////////
Any ideas ? - I have been stuck on this for several hours
Dave
I am trying to bug fix a simple KDE application that uses C++. There
is a main directory with .cpp & .h files in it. I need to write some
additional code and split it up into .cpp & .h files. The code - no
problem. The splitting into ,h & .cpp is the problem. Stripping the
problem to its very bare bones I have ...
ctallowdeny.h ...
/////////////////////////////////////////////////////////////////////
class ctallowdeny
{
public:
ctallowdeny();
~ctallowdeny();
}
/////////////////////////////////////////////////////////////////////////////
ctallowdeny.cpp ...
//////////////////////////////////////////////////////////////////////////////
#include "ctallowdeny.h"
using namespace std;
ctallowdeny::ctallowdeny() {};
ctallowdeny::~ctallowdeny() {};
///////////////////////////////////////////////////////////////////////
and called from KTApp with ...
#include "ctallowdeny.h"
ctallowdeny testbed
When I make I get ...
ktapp.o: In function `KTApp::KTApp()':
ktapp.cpp.text+0x28df): undefined reference to
`ctallowdeny::ctallowdeny()'
ktapp.cpp.text+0x2a4d): undefined reference to
`ctallowdeny::~ctallowdeny()'
ktapp.o: In function `KTApp::KTApp()':
ktapp.cpp.text+0x2b49): undefined reference to
`ctallowdeny::ctallowdeny()'
ktapp.cpp.text+0x2cc4): undefined reference to
`ctallowdeny::~ctallowdeny()'
collect2: ld returned 1 exit status
make[2]: *** [kcron] Error 1
make[2]: Leaving directory `/home/ubuntu/Desktop/kdeadmin-3.5.5/kcron'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/kdeadmin-3.5.5'
make: *** [all] Error 2
ubuntu@ubuntu-desktop:~/Desktop/kdeadmin-3.5.5$
//////////////////////////////////////////////////////////////////////
Any ideas ? - I have been stuck on this for several hours
Dave