Closed tcies closed 10 years ago
See #19
great stuff!!! thanks alot! I have just given it a try, and it failed to resolve the includes properly. could have to do with the merged development space.
does it work when using the '--merge-devel' tag for building the workspace? or only without it? or does it not matter at all?
@mbuerki if you add VERBOSE=1, setup the parser and do a fresh build it should find them.
it doesn't help. the problem probably lies in a somewhat screwed up workspace at my end of some reason. so there's the '~/catkin_aslam/devel/include' folder. this folder shows up in the eclipse project includes. however, I only have a very few number of packages in that folder with exported headers (i.e. gflags, ceres, suitesparse, and some more). it's lacking most of the aslam packages though. is this correct? i.e. if I have a project using the aslam/backend/optmizer2.hpp, should there be a 'backend' folder with the optimizer2.hpp file in the '.../devel/include' directory? (that's not the case at my place) or should it find that header somewhere else? (then that directory is missing in the eclipse includes)
@mbuerki It does not necessarily need the packages in there. If you clean out a package (by deleting the folder catkin_ws/build/$PACKAGE
and then build it from within eclipse with VERBOSE=1
, then the parser of eclipse will read the output of the compiler, more specifically the -I(...)/include/$PACKAGE
statements and thereby find the includes. It is important though that an actual build is executed.
hm when I delete the project folder in 'catkin_aslam/buid' I can't build the project in eclipse anymore (says "no rule to make target 'all'). it seems like there's something really stupid I'm missing here, but I tried to follow the tutorial carefully...
I can have a look at it later - on the run currently
Am 30.05.2014 um 20:30 schrieb "mbuerki" notifications@github.com<mailto:notifications@github.com>:
hm when I delete the project folder in 'catkin_aslam/buid' I can't build the project in eclipse anymore (says "no rule to make target 'all'). it seems like there's something really stupid I'm missing here, but I tried to follow the tutorial carefully...
— Reply to this email directly or view it on GitHubhttps://github.com/ethz-asl/programming_guidelines/issues/18#issuecomment-44683917.
ok, you of course need to run cmake for this package again, otherwise your makefile is gone, issue a catkin_build and cancel it once your package has started building. In any case the important part is that you actually build from within eclipse, however you trigger that.
Maybe a "make clean" would be more helpful here. Afaik this can be done from within Eclipse as well. Then you're sure that all sources will be compiled (thus feeding eclipse all the include dirs) without losing the makefile. Let me know if that works for you, I can add it to the tutorial then.
yes, works! awesome!!! it's resolving the 'size_t's again ;-) hahaha! great!
Ok, awesome :) . I updated the article, see second to last paragraph of https://github.com/ethz-asl/programming_guidelines/wiki/Catkin-Eclipse#adding-a-catkin-package-as-project-to-eclipse
oh crap, I was too fast. it still doesn't resolve the size_t's probably! it's not thinking they are ambiguous, once defined in stddefs.h and once in c++config.h.
in the includes, I have listed both /usr/include/c++/... and /usr/lib/gcc/x86-64-linux-gnu/4.6/include is that the problem? if yes, should I try to remove one of the two includes? if yes, which one? ... and how?
What exactly do you mean by size_t resolution? I don't see how this is an issue.
the size_t's get underlined with this redish curly line indicating that eclipse cannot figure out what it is (saying it's ambiguous with the details stated above)
OK, well then just switch this stupid eclipse feature off :)
What about debuging? I sourced .bashrc_additions like that
bash -c 'source /home/cyborg-x1/.bash_additions; $pathtoeclipse/eclipse"
I created this file because of the "interactivity"-check which is normal for the bashrc. To run/debug I searched for the file in devel and added it. Running works fine so far but on debug I get:
No source available for "main() at 0x409f96"
(In that package I have two nodes btw) Am I missing something?
Did you double check that you compiled your executable with debug symbols (-g) ? (For cmake this is typically achieved with CMAKE_BUILD_TYPE=Debug
or similar. See http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html)
Where exactly shall I put this in eclipse? I tried the builder settings but it did not do anything there.
How do you do it? If I do
I get:
Probably due to: http://stackoverflow.com/questions/16073040/call-cmake-from-python-script-results-in-could-not-create-named-generator
I currently found a workaround by:
As inspired by: http://catkin-tools.readthedocs.org/en/latest/commands/catkin_build.html?highlight=cmake#understanding-the-build-process