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?
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
精彩评论