0
$\begingroup$

Rosanswers logo

Hi,

I've tried to integrate ROS with eclipse following this link. According to step no.2, I had to run "make eclipse-project" in my package directory, however, i got an error "make: *** No rule to make target `eclipse-project'. Stop."

What could be the problem? Thanks in advance.

-alfa-


Originally posted by alfa_80 on ROS Answers with karma: 1053 on 2011-09-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Are you trying to integrate rosjava code or roscpp code?

The instructions for rosjava (in progress) are here:

http://www.ros.org/wiki/rosjava/Build/Eclipse

For roscpp, your project needs to follow the standard package template, where the Makefile looks like:

 include $(shell rospack find mk)/cmake.mk

And nothing more (i.e. the rest of your bulid is configured via CMake). The above cmake.mk file declares the eclipse-project target.

If you don't wish to use the cmake.mk file, then you can grab the necessary Makefile rule from mk/cmake.mk and adapt it to your needs.


Originally posted by kwc with karma: 12244 on 2011-09-29

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by alfa_80 on 2011-09-29:
@kwc: Thanks a lot anyway..

Comment by kwc on 2011-09-29:
Most ROS packages use the include and then do all the build configuration in CMake.

Comment by alfa_80 on 2011-09-29:
Yeah, that works by using that include..By the way, which way is the best practice between those two?

Comment by kwc on 2011-09-29:
Yes, but if you do that include, your Makefile cannot contain anything else -- it is a wrapper for invoking into CMake. So, an alternative is to copy the 'eclipse-project' target out of cmake.mk instead, and put that directly into your Makefile.

Comment by alfa_80 on 2011-09-29:
I didn't get you. Did you mean I have to include "include $(shell rospack find mk)/cmake.mk" in Makefile? As far as I know, it is not recommended to alter the Makefile, to alter CMakeList.txt makes sense.

Comment by kwc on 2011-09-29:
see updated answer above then

Comment by alfa_80 on 2011-09-29:
roscpp, not rosjava.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.