I am trying to upload the Marlin Firmware to my 3D printer's Arduino Mega 2560 and I am experiencing a problem. It keeps saying:

qr_solve.cpp:7:18: fatal error: time.h: No such file or directory
 #include <time.h>
compilation terminated.
Error compiling.

Please help as I'm lost as how to fix it, because I try to scroll up to see what is highlighted in red and I can't find anything.


2 Answers 2


From Gerben's link to the googlegroups's thread, Delta robot 3D printers › compiling jcrocholl's Marlin (Ubuntu), as Francis Mallet points out, at the bottom of the thread, it is necessary to change <time.h> to "Time.h":

I copied the content of the Time library right in the Marlin folder, then changed line 7 of qr_solve.cpp from #include to #include "Time.h"

The code compiled and everything seems to be working ok.

So, to iterate, the line in qr_solve.cpp:

#include <time.h>


#include "Time.h"

Now, Marlin.ino should compile as expected.

Note that the latest version of Marlin, from github.com/MarlinFirmware/Marlin no longer suffers from this issue, but older versions of the software, such as github.com/gpfwestie/kossel_2020_sintron will do, due to line 7, in qr_solve.cpp.


interestingly changing to Time.h didn't work for me (arduino sdk 1.6.9) however commenting out the include line did...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.