Hi,
I am facing compilation problems with including header files using
relative paths. With the same directory structure it works fine with
gcc and cl.exe(MSVC++ compiler.)
Here is the scenario :-
I have a directory structure as follows:-
System
|
|-----Source (contians main.c )
|
|-----Include (contins interface.h)
|
|-----Module
|
|-------ModuleHeaders (contians mod1.h and mod2.h )
* My include path is set to the "Include" directory.
* interface.h is included in main.c
* interface.h contains following inclusions using relative paths
#include "..\Module\ModuleHeaders\mod1.h"
#include "..\Module\ModuleHeaders\mod2.h"
* mod2.h contains following file inclusion
#include "mod1.h"
Compiling main.c results in an error complaining that file mod1.h
included in mod2.h is not found.
I think gcc and VC6 considers/searches the path from which the file is
being included which in this case is Module\ModuleHeaders\ but
Codewarrior fails to do so and gives "cannot open file" error.
I wonder if this is a shortcoming in the codewarrior IDE.
Regards,
Shrirang Khare.