开发者

Eclipse CDT -- How to map Linux path's to Windows paths?

开发者 https://www.devze.com 2022-12-28 02:34 出处:网络
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 tha

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

0

精彩评论

暂无评论...
验证码 换一张
取 消