diff --git a/src/solver-abstract.cpp b/src/solver-abstract.cpp
index 4f1d23baef8090d273cb28dd6aad192bd820827c..253d1337e0a2a996a05a0a0a89ebf16137913eaa 100644
--- a/src/solver-abstract.cpp
+++ b/src/solver-abstract.cpp
@@ -23,6 +23,7 @@
 #include <solver/eiquadprog-fast.hpp>
 
 #include <Eigen/Sparse>
+#include <stdexcept>
 
 namespace solvers
 {