views:

118

answers:

1

We have a C-code project written for a Linux environment but we also want the ability to view and edit the code on Eclipse for Windows and have the headers be resolved. The problem we are facing is that a lot of the headers are included with absolute paths in the Linux format such as:

#include "/path/to/custom/header.h"

What I would like to be able to do is have Eclipse CDT map:
/path/to/custom/ --> C:\path\to\custom\

Is this possible?

+1  A: 

I suppose you should rather use the classic way and inlude the directories where the header files are located, instead of refering to an absolute path in your sources.

#include "header.h"

and add -Ic:\path\to\custom

stacker
Ideally this is what would have been done in the first place (read: if I was around at that time). However, with hundreds of files that really isn't feasible at this point in time.
SiegeX
How about using an editor and doing global search/replace in the filesystem?
stacker