使Eclipse CDT在生成的Makefile中使用相对包含路径 [英] Getting Eclipse CDT to use relative include paths in generated Makefiles

查看:181
本文介绍了使Eclipse CDT在生成的Makefile中使用相对包含路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse CDT。我已经配置了外部生成器,并且我自动生成Makefile。不幸的是,生成的Makefile包含绝对包含路径。我想在其他系统(其中没有安装Eclipse)中使用生成的Makefile - 有没有办法让Eclipse在Makefile中使用相对路径?



我有配置我的项目包括目录在设置 - >工具设置 - > GCC C编译器 - >使用$ {workspace_log}包含路径。

解决方案

如果在'include paths'(而不是 $ {workspace_loc} )中使用相对路径,那么makefile(和.mk文件使用)将包括相对路径好吧。


I am using the Eclipse CDT. I have configured the "external Builder" and I am generating the Makefiles automatically. Unfortunately, the generated Makefiles contain the absolute include path. I would like to use the generated Makefiles on other systems (where Eclipse is not installed) - is there a way to make Eclipse use relative paths into the Makefile?

I have configured my projects include directory under Settings -> Tool Settings -> GCC C Compiler -> Include Paths using ${workspace_log}.

解决方案

If you use relative path in the 'include paths' (instead of ${workspace_loc}), then the makefile (and .mk files it uses) will include relative paths as well.

这篇关于使Eclipse CDT在生成的Makefile中使用相对包含路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆