-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add eclipse CDT project with indexer includes #2649
Conversation
Does this eliminate all "unresolved" warnings? |
This doesn't eliminate all of them, but certainly the vast majority. For example commander and navigator aren't reporting any errors for me. If you encounter something missing you probably need to add an include path to eclipse (C/C++ General -> Paths and Symbols -> Includes) or possibly a define. Please give it a try and let me know if it works for you. |
I show the symbol "OK" unresolved in commander.cpp, and can't find any includes referenced by commander.cpp which define it. (cherry-picked this commit into beta, created a new Eclipse workspace and imported the project) |
I checked your branch out directly and (after a complete rebuild) there were initially no unresolved reference "errors" shown for commander.cpp
rebuilding the C index had no effect |
Alright, so what we actually need to do is let eclipse build the project. I started with a fresh workspace, let the indexer finish and still had errors. After building px4fmu-v2_default from eclipse (which just calls the makefile) everything is resolving. |
Building from eclipse didn't resolve anything for you? |
Sorry, I meant all of the errors in the entire project went away with the change to the CodeAnalysis options. commander.cpp was clean before doing that. |
It looks like the CodeAnalysis options are stored in the .settings/ directory which I'm not sure we should commit? |
I think adding Eclipse project files is an improvement |
@LorenzMeier This is good to go. |
I'll merge this if you put the rest of the things discussed onto the Eclipse wiki page and add a link in the README to both the eclipse and sublime pages 8). |
Yes I'll update the wiki and add the missing targets to this PR. This should simplify the instructions nicely. Do you mind if the "Automatic Initial Source Download" instructions (PX4 Toolchain → PX4 Software download) change to just using eclipse to clone which also imports the project? |
I'm curious to see whether you can reproduce this result... |
Isn't that just trading a few cases where the indexer is confused to making them actually unresolved, but then not displaying the error? |
No, all of the problem symbols I checked now resolve correctly. That's what I meant (above) by "And "Open Declaration" and "References:Project" then work for the symbols which it claimed were unresolved." |
add eclipse CDT project with indexer includes
I've been travelling, but I'll still get the wiki updated when I return. On Tue, Aug 11, 2015 at 7:42 AM, Lorenz Meier [email protected]
|
Eclipse wiki page updated. |
This isn't perfect, but most things should now resolve within eclipse. You can build archives, px4fmu-v2_default or upload, but it's just calling the makefile.