views:

292

answers:

3

Hi all, I've just downloaded Eclipse CDT developer kit (87MB) for Windows. I've also installed MinGW, and msys. I also added this to PATH: C:\msys\1.0\bin;C:\mingw\bin. and restarted computer after that. I've checked by type "make --version" in cmd and it works.

However, for some reason I cannot compile my C project. I don't get binary files and got only the following things in COnsole:

**** Build of configuration Default for project XXX ****

make all 
make: *** No rule to make target `all'.  Stop.

Could some one help me with this please?

A: 

I spent a lot of time on this error and now realized that those projects that are not compiled were created before I installed MinGW and msys so there was no makefile before. And there was no include folder with link to the makefile. That's the reason why I could not compile it. Now as I create new project, it's fine.

However, I wonder if there is any way to add the path to makefile for the previous projects?

Thanks

chepukha
A: 

Here is a detailed guide to getting native C code for android compiling in eclipse: http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on

Chozabu
A: 

Just for your reference, there is a way to configure the CDT build options. I had this same error message (although I did have a make target - just not named "all") and found this solution (for Galileo + CDT):

Right click your project and choose Properties. The Properties dialog will appear and you should see a C/C++ Build option where you can set specific build options. Highlight this item, and the Properties page will appear. Choose the configuration you wish to modify, and then in the section below that you should see 2 tabs: Builder Settings and Behavior. It is the Behavior tab you want. In this section you can set preferences for build settings and workbench settings, including specifying a target name (default is "all") or turning off automatic builds.

This was incredibly helpful to me when I started using the CDT. My source code is separate from the build area, and until I configure, no makefiles exist. When I configured, my default target name is explicitly "default", not "all". It was annoying to have Eclipse report an error in my project before I did anything. Setting up the environment to match my development worked wonders. HTH.

twokats