diff --git a/src/PDB.h b/src/PDB.h
index c8e59960a15c6acc93b07723a5d9364c0198fada..09c652bf451d1db1cd17e98f80a9279bb730dadc 100644
--- a/src/PDB.h
+++ b/src/PDB.h
@@ -4,6 +4,7 @@
 #include "AtomNumber.h"
 #include "Vector.h"
 #include <vector>
+#include <string>
 
 namespace PLMD{
 
diff --git a/src/Tools.h b/src/Tools.h
index f272f65165fc1fcd0b67efc2314ace0cde662eaf..a57f09813abe456f4f60fafcbdbaf94c9ffefe11 100644
--- a/src/Tools.h
+++ b/src/Tools.h
@@ -8,6 +8,7 @@
 #include <cmath>
 #include <limits>
 #include <algorithm>
+#include <string.h>
 
 namespace PLMD{