Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Include paths not reflected in makefile
Include paths not reflected in makefile [message #1765728] Tue, 13 June 2017 22:02 Go to next message
Lex Nox is currently offline Lex NoxFriend
Messages: 3
Registered: June 2017
Junior Member
I am using STM's System Workbench version 2.0.0.

I have noticed that when I edit the include paths (Project Properties>C/C++ General>Paths and Symbols>GNU C>Edit), am able to add include paths that resolve and show up in the GUI under the includes expansion.

My include path changes can also be seen in Project Properites>C/C++ Build>Settings>Includes.

I have "Generate Makefiles automatically" checked, but even after doing a clean/deleting the Debug file where makefiles & outputs are placed, I can see that the makefile does not update to add my include paths, and I get a build error ("No such file or directory") because the newly added include path is not used.

Has anyone had this problem before, and how did you solve it? Or is there a way to look at how Eclipse auto-generates it's makefiles to figure out where the discrepancy between the GUI-provided includes and the ones that make it into the makefile is coming from?

Thank you!

******************
EDIT: The build error was coming from .c and .h files in another folder on my file system that I have added to the project as "Linked Resources". I have noticed that in the .cproject file, a new <folderInfo> entry is created for my linked resources, and that my changes to the include paths (or any other build setting) are not propagated to this other <folderInfo>'s properties. Is there a way to cause updates to an include path to apply to all <folderInfo .... resourcePath> values in the project? Or to edit these without hacking the cproject?

[Updated on: Wed, 21 June 2017 16:57]

Report message to a moderator

Re: Include paths not reflected in makefile [message #1765867 is a reply to message #1765728] Wed, 14 June 2017 05:13 Go to previous messageGo to next message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
I don't normally use Project --> Properties --> C/C++ General --> Paths and Symbols -->GNU C -->Edit or Add
I tried both and they work for me.
Maybe it's a problem with the third party STM's System Workbench
Re: Include paths not reflected in makefile [message #1765978 is a reply to message #1765867] Wed, 14 June 2017 16:33 Go to previous messageGo to next message
Lex Nox is currently offline Lex NoxFriend
Messages: 3
Registered: June 2017
Junior Member
Thanks for the response- I added a little more information above as I've found some more information since my post. It looks like the changes to the includes are only applied to one resource folder and not to the linked in resources
Re: Include paths not reflected in makefile [message #1765996 is a reply to message #1765978] Wed, 14 June 2017 17:39 Go to previous messageGo to next message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
Directories exported from other projects should show up in
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entries tab --> Exported Entries[ from Referenced Projects

If changes to linked projects aren't there you may need to turn on the Provider for exported entries
or, if already enabled, toggle it off then on again
or you could try refreshing the current project in Project Explorer
or rebuilding the index with Project --> C/C++ Index --> Rebuild
or all of the above.

Other than that, you may have uncovered a bug but work will need to be done to narrow down the cause.

[Updated on: Wed, 14 June 2017 22:03]

Report message to a moderator

Re: Include paths not reflected in makefile [message #1766476 is a reply to message #1765996] Wed, 21 June 2017 21:34 Go to previous message
Lex Nox is currently offline Lex NoxFriend
Messages: 3
Registered: June 2017
Junior Member
Another clarification (I edited my original post to try to make this a little clearer) but I have only included additional .c and .h files from a different file system location as linked resources (and not an entire project, just a couple of files from a repo I have cloned). I would like the build settings in the Project>Properties that I apply to the whole project to be applied to the build of these files as well.

I tried to play around with the Entries/Provider tabs but I'm not fully sure I understand how they are affecting my project. I have found that going into my .cproject file and deleting the new <folderInfo> completely and then cleaning and rebuilding the project seems to have fixed the problem and forces the project build settings to be applied to the new files I added as well.



Previous Topic:Change application transfer protocol (remote debugging)
Next Topic:JDT kit for C/C++ IDE -Erorrs
Goto Forum:
  


Current Time: Sun Aug 14 06:15:43 GMT 2022

Powered by FUDForum. Page generated in 0.04324 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top