Compile tool button doesn´t work

W. Tasin tasin at e-technik.fh-muenchen.de
Sat Apr 8 11:38:36 UTC 2000


Ralf Nolden wrote:
> 
> Falk Brettschneider wrote:
> >
> > Hi!
> >
> > "W. Tasin" wrote:
> > >
> > > Falk Brettschneider wrote:
> > > >
> > > > Hi,
> > > >
> > > > With a customer project only the "Build" toolbutton works. A click on
> > > > "Compile" causes an error message that the file cannot be found... :-(
> > > > --
> > >
> > > I tried this too...
> > > and worked...
> > >
> > > even in a minimalistic solution:
> > >
> > > costum_project:
> > > ~/project/custom_project/custom_project.kdevprj
> > > ~/project/custom_project/custom_project/Makefile
> > > ~/project/custom_project/custom_project/test.c
> > That might be the problem...You don´t use sub-directories :)
> >
> > My project structure is:
> > ~/project/include/test.h
> > ~/project/src/test.cpp
> > ~/project/src/main.cpp
> > ~/project/res/test.xpm
> > ~/project/Makefile
> > ~/project/test.pro
> > ~/test.kdevprj
> >
> > The exact error message is:
> > g++  -O0 -g3 -Wall      -c test.cpp -o test.o
> > test.cpp:10: test.h: Datei oder Verzeichnis nicht gefunden
> > make: *** [test.o] Error 1
> > *** failed ***
> ;-) you should add a section with setting include path to -I./include
> ;-) don´t you ?
> Or include it with #include "../include/test.h"
> 
> Ralf
> 

Hi together,

this problem is solved!
KDevelop expected in every directory a Makefile (which is right for all
the other project types except the custom one)

So Falk´s project has only one Makefile, which handles the complete
project inside ~/project/project. In ~/project/src instead there is no
Makefile for "only compiling" the sources, so an internal make rule
would be called (that's why you didn't see any compiler flags in the
call above).

Now for custom projects the behaviour is that (and _only_ for custom
projects):
On Compile Sources:
- try to use the Makefile of the directory in which the actual
*.(c|cpp|ecpp...) resides
  if it exists then
make test.o
(as it was already performed)

 if there is no Makefile, check the exitance of
 projectDir()+subDir()/Makefile (e.g. ~/myProject/myProject/Makefile)
 if true then
make -f ~/myProject/myProject/Makefile test.o

 if there is no Makefile, too
 check for existance of the Makefile inside projectDir() (e.g.
~/myProject/Makefile)
 if true then
make -f ~/myProject/Makefile test.o
 
On Build/Make:
- default way, change to projectDir()+subDir() 
  if it is a custom project and there wouldn´t be a Makefile in this
directory, so check
  if there is a Makefile in projectDir(), if true change to ProjectDir()
- then perform make

Hope this solves some custom project problems...
Bye

Walter

-- 
The KDevelop project: tasin at kdevelop.de [www.kdevelop.org]
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB
04,FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>




More information about the KDevelop-devel mailing list