Quadratic Programming and Optimization in arduino?

Remove the references to iostream and stdexcept and that will probably run just fine on a Teensy or most other Arduinos.

What specific problems are preventing you from doing that?