Correct solution for "multiple definition of" compile error I'm in the process of trying to take this demo sketch and extract the necessary bits into a modular library that can be included in other sketches.

Here's where I'm at so far.

Here's the test sketch that I'm including it in.

However, when I try to compile it right now, I'm getting...

libraries/Adafruit_CC3000_Dynamodb/sha256.cpp.o: In function `Sha256Class::init()':
/home/me/sketchbook/libraries/Adafruit_CC3000_Dynamodb/sha256.cpp:33: multiple definition of `Sha256Class::init()'
sketch/sha256.cpp.o:sketch/sha256.cpp:33: first defined here


I've been programming for years in other languages, but I'm not all that experienced in C. I'm sure I'm doing something completely stupid, but I can't figure out what it is.

I'm also aware that this code still needs a lot of cleanup work in general. Right now I'm just trying to work toward a basic MVP that works so that I start gradually cleaning things up and making it more OOP one step at a time.
You have an old copy of the sha256 files lingering in the build folder. These will have been output at some point in the past and never been cleaned up since they have been deleted from the IDE.

It is probably a bug in the IDE that doesn't remove the old files.

Restarting the IDE will cure the problem and allow you to compile.