Getting Eclipse CDT to use relative include paths in generated Makefiles

前端 未结 4 776
难免孤独
难免孤独 2020-12-17 16:56

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 ab

4条回答
  •  無奈伤痛
    2020-12-17 17:39

    There is a better way to do this: "Project > Properties > C/C++ Build > Settings > Tool Settings > Cross G++ [or GCC] Compiler > Includes". Click plus button, then write:

    "${ProjDirPath}/../../../somefolder1/somefolder2"

    This approach allows you to specify any external folder by relative path to your project folder, even if it is located in parent subfolders.

提交回复
热议问题