Either a KDevelop Bug, or my own error;

Troy Telford troyt at myrealbox.com
Sat Apr 15 23:41:41 BST 2000


But, here's the deal.  First, I will say that I'm not the most capable
C++
programmer at this point; I'm in like my 3rd course for it at my
University.

Now, I have a rather small program that has two classes, and contains
a few .cpp files and their headers.  One class keeps track of 'student-
data', and is basically a container.  Another is a hash-table class.  I
have a third function file just for the hell of it.  (Don't know why...
but
I like a 'main.cpp' file to be nigh-unto-empty).

Now, having what I was taught is the correct way to handle the
includes for these files, I invoked the build command.

All the files are fine; there are no errors in them.  However, make
returns errors about multiple declarations of functions.  Being curious,

ran a shell and simply used the 'g++ -o program main.cpp' command.
The program compiled (and runs...) just fine.

So, now even more curious, I tried removing the class .cpp files from
the project's LFV (but left them on the disk).  Now, it compiles just
fine.

Now, when the program works, this is great - but when I need to run
into and debug code, it's a bit tedious to move around like that.

So my question is this:  Is there any reason that having the class's
.cpp files in the 'sources' section of the LFV results in make returning

duplicate function definition errors - while removing them from the
'sources' section of LFV allows a full compile?






More information about the KDevelop mailing list