What is the current state of using Eclipse for openframeworks projects? Does anyone have any tips? The googled tutorials and threads are all very old.
I am using ubuntu 64bit 12.10 and the master github branch of openframeworks.
All my project compile, debug and run fine in code::blocks, however I’d prefer to use only one ide and I already use eclipse for other projects.
I have also got the android examples working in eclipse.
My linux projects build and run in eclipse but I have unresolved inclusions when it refers to the openframeworks libraries and debug issues. I imported the projects as “Existing code as makefile project”
basically: runs without problems.
have you also added the openFrameworks project to the workspace? (i.e. step k in this guide http://www.openframeworks.cc/setup/android-eclipse/)
in your project, have you made a reference (in the project menu, build, paths, or something like this) to the OF project?
i can help later but i’m currently busy.
Thanks for the feedback, at least I know it is possible so I will try more. Anyway no rush bilderbuchi, I can do everything I need in code:blocks in the interim.
I can build the open frameworks project from makefile in the same workspace. I will check the android steps again to see if I am missing anything.
eclipse code analysis doesn’t work very well with makefile projects try disabling it in the preferences for the project or even better for the whole workspace
unresolved inclusion are often matter of the indexer, though, and not code analysis afaik. normally I can fix those by adding references to other projects (i.e. addons and libs in the openframeworks project, and the openframeworks project in my user projects/examples) in Project Properties - Project References and/or C++ General-Paths and Symbols-References. You have to play around a bit probably, and re-index/refresh the index (right mouse-Index on the project) a couple times until you get all includes resolved.
the eclipse CDT UI for references is unfortunately not super clear due to a functionality overlap with the “core” eclipse References, afaik the CDT dev team don’t know yet how to resolve this properly.
normally, I can get proper code completion, and only few false positives source code errors (some math functions not recognized etc). all in all it’s finicky, but works often. :-\
thanks bilderbuchi, I managed to sort this out at last.
Your tips on adding the projects to Project Properties - Project References and refreshing the index helped.
To make the debugging work correctly I had to make a Debug build configuration in the C/C++ Build section and make sure the command is make Debug otherwise the project was not built with debug symbols on. Also I had to change the application to bin/projectName_debug in the Run/Debug configuration.
Now F3 works and also I can step in the code.
I have made screenshots of how to setup a sample project in Ubuntu 12.10 on eclipse using the projectGenerator tool and then setting up an eclipse workspace from scratch so that it compiles does code complete and debugs properly.
I can write a tutorial now. Where do we want to put this documentation? in the wiki? on the main site?
that’s great! you could mirror the android-eclipse setup guide, and make one (in a folder) for linux-eclipse here: https://github.com/openframeworks/ofSite/tree/master/setup. check the index.html.mako of the android-eclipse guide.
you can test locally how this works, check https://github.com/openframeworks/ofSite/blob/master/readme.md
possibly you have to link to the new html file somewhere, but we can always manage that later, most important is the guide itself.
sry i don’t know more about it, maybe someone else is more versed in the documentation update process
The setup for Linux eclipse has been merged with the main site. Let me know if anybody sees mistakes or jmprovements. I think possibly the questions will come from loading java on ubuntu and the missing eclipse project files when you use the tgz download for eclipse.
Thank you so much for this awesome guide! Btw, nice trick with the external tools button for the projectgenerator, I wasn’t aware of that!