| Indexer with multiple projects [message #1008245] |
Mon, 11 February 2013 12:37  |
Josh Kelley Messages: 4 Registered: July 2009 |
Junior Member |
|
|
In Eclipse Juno (Eclipse 4.2 with Eclipse CDT 8.1), I have multiple projects set up: several libraries that we maintain and several applications that are based on those libraries.
The indexer works great for each library, and it works okay for each of the projects (it's able to correctly resolve a project's references to library symbols). However, the indexer never automatically updates an application when one of its dependent projects changes. So, for example, if I edit a library's .h file to add a function then edit an application's .cpp file to add a call to the new function, the CDT's code analysis flags it as an unresolved symbol within that application project. The only workaround I've found is to manually right-click on the application in the Eclipse Project Explorer, go under Index, and chose Update with Modified Files.
Is there a way to have the indexer automatically update a project whenever source files in another project change?
|
|
|
| Re: Indexer with multiple projects [message #1008615 is a reply to message #1008245] |
Wed, 13 February 2013 05:12   |
Axel Mueller Messages: 1828 Registered: July 2009 |
Senior Member |
|
|
Each project has its own index. You must export the index.
For example you have project lib and project app and you want to use some classes/functions from lib in your app.
- Open Project Properties of project lib
- C/C++ General->Export Settings
In Tab Includes click "Add..." and then select "Workspace..." /lib
- Open Project Properties of project app
- C/C++ General->Paths and Symbols
In Tab References select project lib
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
|
|
|
|
| Re: Indexer with multiple projects [message #1011252 is a reply to message #1011023] |
Tue, 19 February 2013 02:24   |
Axel Mueller Messages: 1828 Registered: July 2009 |
Senior Member |
|
|
Josh Kelley wrote on Mon, 18 February 2013 18:27
My problem is that app doesn't pick up changes to lib unless I manually reindex app. This is a bit tedious, so I'm wondering if there's a way to have app automatically update its index for changes to lib (just like app automatically updates its index for changes to app).
I noticed the same erroneous behavior recently. According to this bug entry https://bugs.eclipse.org/bugs/show_bug.cgi?id=310837 it should have been fixed long ago. I will setup a small test project to see if I can reproduce it.
I could reproduce the bug locally. I made an attachment to the above mentioned bugzilla entry. Hopefully one of the CDT dev will have a look at it.
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
[Updated on: Tue, 19 February 2013 02:44] Report message to a moderator
|
|
|
| Re: Indexer with multiple projects [message #1011540 is a reply to message #1011252] |
Tue, 19 February 2013 13:58  |
Josh Kelley Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Axel Mueller wrote on Tue, 19 February 2013 02:24
I noticed the same erroneous behavior recently. According to this bug entry https://bugs.eclipse.org/bugs/show_bug.cgi?id=310837 it should have been fixed long ago. I will setup a small test project to see if I can reproduce it.
I could reproduce the bug locally. I made an attachment to the above mentioned bugzilla entry. Hopefully one of the CDT dev will have a look at it.
Thank you very much for your help. I'll watch that bug for further info.
|
|
|
Powered by
FUDForum. Page generated in 0.01754 seconds