[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop
Subject: Re: Noch einmal Projektsuchpfade "UNDEFINED REFERENCE"
From: August =?iso-8859-1?Q?H=F6randl?= <august.hoerandl () gmx ! at>
Date: 2001-07-11 21:40:13
[Download RAW message or body]
Marco Keuthen wrote:
> =
> Hallo,
> =
> ich habe folgende Problematik.
> Ich habe eine Klasse erstellt (*.h und *.cpp) Die files befinden sich n=
icht
> in einem Suchpfad.
> Zwischenzeitlich habe ich unter MEN=DC-PROJEKTOPTIONEN - COMPILER mitte=
ls
> -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 benu=
tzen
> (UNDEFINDED REFERENCE)
> 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:
the
=2Ecpp files aren't compiled and linked
answer:
long:
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
strlen() =
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
one: =
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 =
short:
you have to copy the files into the projekt directory: try
kdevelop/project/
add existing files - which copies the files to the right place and
includes
them into the project; so they are compiled and linked into the result
hth
Gustl
-- =
\|/
(o o)
-----*schnippel*----oOO--(_)--OOo----*knabber*----*reiss*----*fetz*--
August H=F6randl august.hoerandl@gmx.at
-
to unsubscribe from this list send an email to kdevelop-request@kdevelop.org with the following body:
unsubscribe »your-email-address«
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic