Eclipse and Arduino 1.0

Hello,

Im trying to use the new SD library from Arduino 1.0, but I have some errors in the library. Right now I just included the library in my project and it gets compiled everytime.

So in SD.h eclipse gives me the following error on this line: File openNextFile(uint8_t mode = O_RDONLY); "The type 'File' must implement the inherited pure virtual methode 'Print::write'

And in File.cpp it doesn't find anything with "setWriteError()" and "clearWriteError()" or "getWriteError()"

So how can i Compile the library SD or how can i fix this?

Thanks!

Does your code compile in the Arduino IDE? In other words, is this strictly an Eclipse issue?

Its just the library code that doesnt compile compleatly because it gives errors, so basicly the SD library doesnt compile. My code does compile.

Would you like to try again to answer the question? Do you have the same problem in the IDE?

ofcourse not, because in the IDE i can just include the SD library like #include <SD.h> and it works, in eclipse i copied the SD folder to my project dir and then compile my project with the SD library but it gives me errors. Ofcourse my code will work in the IDE.

ofcourse not, because in the IDE i can just include the SD library like #include <SD.h> and it works,

Then, this bit:

but I have some errors in the library.

is nonsense. The error is not in the library, it is in how Eclipse is compiling all the Arduino code.

Now that we are clear on that, we (well, not me, because I don’t use or care about Eclipse) can help solve the problem.

because in the IDE i can just include the SD library like #include <SD.h> and it works

Are you saying that you haven’t done #include <SD.h> in the eclipse ide? #include isn’t an arduino ide feature, it’s a compiler directive. It’s still needed in eclipse to tell the underlying compiler to pull the code in.

I use #include "SD/SD.h" since the location of the lib is in my eclipse source folder in the map SD. So oke my question is, how can i compile the SD library to work in Eclipse?

Thanks!

Like Paul, I don't use eclipse. Does this help...

http://www.baeyens.it/eclipse/UsethePlugin.html

It talks about importing libraries.