Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Windows > Problems in fil...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 294 of 318
Post > Topic >>

Problems in files included using relative paths.

by "Shrirang Khare" <shrirang.khare@[EMAIL PROTECTED] > Oct 28, 2005 at 02:53 AM

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.




 2 Posts in Topic:
Problems in files included using relative paths.
"Shrirang Khare"  2005-10-28 02:53:10 
Re: Problems in files included using relative paths.
Ron L <ron.liechty@[EM  2005-10-31 09:59:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue May 13 16:44:42 CDT 2008.