0

I am having a compiling error with my new code. I cannot find the anything wrong. I have searched google. Any help would be great. Please see below for the code and the error message.

Code: http://pastebin.com/cLprnCRz

Error Message: http://pastebin.com/azkc9QLY

  • 1
    hello, welcome to stack overflow, please make a simple minimal concise example of your code that contains the error, and then post it within your question. If you help us help you, we'll be happy to do so! – zmo Aug 13 '15 at 01:37
  • I am sorry but the error message is vague and I do not know where the error is coming from. I have tried multiple things but I think it has to do with the time commands, I believe that the issue is coming from the RTC. – John Stilwell Aug 13 '15 at 01:41
  • well, cf my answer, the error is not vague at all, it's actually pretty clear ;-) – zmo Aug 13 '15 at 01:42

1 Answers1

0

well, your error is not in your code, it's in the file you're including sha1.h which is implementing a virtual method from Print.h but with the wrong return type:

in sha1.h:

virtual void Sha1Class::write(uint8_t)
        ^^^^

in Print.h:

virtual size_t Print::write(uint8_t)
        ^^^^^^

your sha1 library is likely to have been written for a different version of the Arduino framework.

The error is pretty clear, as it says:

error: conflicting return type specified for 'virtual void Sha1Class::write(uint8_t)'
error:   overriding 'virtual size_t Print::write(uint8_t)'

so the compiler is saying here:

"You're defining in Print.h a method that has to be reimplemented of a given type, and when you're reimplementing it, you're giving it another type. I did my best, but really, I don't understand what you want!"

zmo
  • 24,463
  • 4
  • 54
  • 90