转载 eclipse中的include设置

备注:在10.1版的niosii使用的eclipse中设置的方法是右键->properties->c/c++general->path and symbols->include选项卡下选择gnu c 之后可以添加路径。

如果我的项目有如下结构:

--io

     --channel.c

--incl_os

    --channel.h

 

如果要在channel.c文件中包含文件include.h文件, 可以在文件中包含如下语句

 

[cpp] view plaincopy
 
  1. #include "../incl_os/channel.h"  


这个看起来有点过于麻烦,我们希望能够实现如下包含方式

 

 

[cpp] view plaincopy
 
  1. #include "channel.h"  

就需要进行如下设置:

 


posted @ 2014-09-26 15:57  lianjiehere  阅读(1369)  评论(0编辑  收藏  举报