chipKIT32/chipKIT32-MAX — Issue #203: sqrt() include problem in AccelStepper library
Author: EmbeddedMan
Created: 2012-02-04 23:29:52+00:00
State: open

In the Mpide-0023-windows-20120122-test build, if you download the AccelStepper library from here : http://www.open.com.au/mikem/arduino/AccelStepper/ and try to run any of the examples, you get the following compile error:

C:\Program Files\mpide-0023-windows-20120122-test\.\hardware\pic32\libraries\AccelStepper\AccelStepper.cpp: In member function 'virtual float AccelStepper::desiredSpeed()':
C:\Program Files\mpide-0023-windows-20120122-test\.\hardware\pic32\libraries\AccelStepper\AccelStepper.cpp:120:31: error: 'sqrt' was not declared in this scope
C:\Program Files\mpide-0023-windows-20120122-test\.\hardware\pic32\libraries\AccelStepper\AccelStepper.cpp:131:32: error: 'sqrt' was not declared in this scope

Now, sqrt() works fine if included in the main sketch. But in a library .cpp file, it doesn't.

*Brian