Go Down

Topic: SO close to getting Eclipse and Arduino to work, I get errors on build (Read 860 times) previous topic - next topic


I followed the instructions here: http://www.arduino.cc/playground/Code/Eclipse and tried to set up a new IDE for programming my Ardiuno Uno. I built my own static library and added the includes and wrote a little test program that I made originally in the Ardiuno programming environment. I made sure to follow the directions and not use loop() or setup() and whatnot. But... I get two errors whenever I build my project. This is the first error:
Code: [Select]
cannot find -llibUnoCore. (note that my static library was named UnoCore, so it generated libUnoCore.a) I'm not quite sure what this error means, but I think it means it can't find libUnoCore.a. Also, I noticed that I think the command should be
Code: [Select]
-l libUnoCore instead of what it is now, so should I add a space before the name of the file?
Anyways, I'm kinda confused about one aspect of the setup. When I go to Properties/C/C++ Build/Settings/AVR C++ Linker/Libraries, I'm not sure what I should use as a "Libraries Path". The libUnoCore.a file was generated in UnoCore\Debug, so should I set it there or just to UnoCore?

The next error I believe is just because I got the first error. The error says
Code: [Select]
make: *** [Arduino.elf]  Error 1 which I assume just means it failed to build the project because of the first error.

I would really like to set up Eclipse so I can get more functionality over the basic Arduino IDE. Any help for my problem is much appreciated.

By the way, here's the code to my basic program:
Code: [Select]
#include "WProgram.h"

float multiplier = (180.0 / 1023.0);

float getPotPinForLED() {
return (analogRead(2) * multiplier);

int main() {
pinMode(11, OUTPUT);
digitalWrite(11, LOW);
for (;;) {
float potpin = getPotPinForLED();
analogWrite(11, potpin);

Thanks in advance  :).

By the by the way- I'm really sorry if this is the wrong location for this thread. Please move it if it's in the wrong location.

P.S- Hm, someone with my same problem here: http://www.instructables.com/answers/How-to-set-up-Eclipse-for-Arduino-Development/ fixed it just by a fresh install of Eclipse. I guess I'll try that tomorrow.


The space is not necessary (and might cause issues), leave it as -llibUnoCore.
Anyways, you should set it to UnoCore\Debug, otherwise gcc will not be able to find the library. That will hopefully solve your problem.


Sep 04, 2011, 07:40 am Last Edit: Sep 04, 2011, 08:21 am by cogeary01 Reason: 1
alright thanks for the quick response. But... it didn't work.

Meh, I'll try the fresh install of Eclipse tonight. I'll reply back.

Awesome, it worked! Thanks for trying to help. I don't know why that happened, but it's probably something I did wrong :P.

Go Up