Noch einmal Projektsuchpfade "UNDEFINED REFERENCE"

August Hörandl august.hoerandl at
Wed Jul 11 22:40:13 BST 2001

Marco Keuthen wrote:
> Hallo,
> ich habe folgende Problematik.
> Ich habe eine Klasse erstellt (*.h und *.cpp) Die files befinden sich nicht
> in einem Suchpfad.
> Zwischenzeitlich habe ich unter MENÜ-PROJEKTOPTIONEN - COMPILER mittels
> -I<Pfad> den Pfad dahin gelegt.
> Er kompiliert das auch, denn es befindet sich eine .o Datei in den
> Verzeichnis.
> Aber er scheint die .cpp Datei nicht zu finden, denn alle Methoden der
> Klasse, deren Deklaration in der .h Datei steht, lassen sich nicht benutzen
> Sobald ich die Methoden inline in der .h Datei habe, klappt es.
> Irgendwie scheint er die .cpp Datei zu ignorieren.

okay - this is an english speaking list

short english summary of the question:
marco has used -Ipath to specify some .h and .cpp files - the problem:
.cpp files aren't compiled and linked

first: -I specifies the include path - where to search for .h 
 files -- nothing else

c/c++ is a little "stupid": the compiler and the linker don't have any
idea which .h and .cpp files belong together - you use for example
and include <string.h> -- put there is no string.c or string.o within
the include directory or anywhere else

that why there is a project in kdevelop which results in a Makefile with 
this info

next: just because there is an .o file somewhere it may be the wrong
other compiler options, wrong defines, wrong compile (gcc, g++), cross 
compiled, there is a lot to be wrong

thats why kdevelop likes all source files to be in the project directory
and not distributed everywhere 

you have to copy the files into the projekt directory: try
add existing files - which copies the files to the right place and
them into the project; so they are compiled and linked into the result


                        (o o)
August Hörandl                                 august.hoerandl at

to unsubscribe from this list send an email to kdevelop-request at with the following body:
unsubscribe »your-email-address«

More information about the KDevelop mailing list