Hi
(I' am using: c++,Eclipse,CDT,Mingw & GDB on windows xp)
When i have my header files in 'scorce folder' then it's working fine..
but if i have my header files in separate 'header folder' then comes the error..
'function1' was not declared in this scope
function1.h: No such file or directory
I tried with these 2 makefile files but it seem to be not working, please see if someone can help me in this.
1)
main.exe: main.o function1.o
g++ main.o function1.o -o main.exe
main.o: main.cpp function1.h
g++ -c main.cpp
function1.o: function1.cpp function1.h
g++ -c -I"C:\Documents and Settings\kdevarajan\workspace\Mycpp\Header" function1.cpp
2)
main.exe: main.o function1.o
g++ main.o function1.o -o $@
.cpp.o: function1.h
g++ -c -I"C:\Documents and Settings\kdevarajan\workspace\Mycpp\Header" $< -o $@
Thanks in advance...