Exit status 1 'calculateSum' was not declared in this scope

Found that spurious bracket. If I had my glasses on......

New error message:
avrdude: ser_open(): can't open device "\.\COM3": The semaphore timeout period has expired.

Where will it end?