dymo-cups-drivers icon indicating copy to clipboard operation
dymo-cups-drivers copied to clipboard

make reported error:'time' was not declared

Open yingopq opened this issue 2 years ago • 0 comments

'make' reported error for missing header file:

LabelManagerLanguageMonitorV2.cpp: In member function 'void DymoPrinterDriver::CLabelManagerLanguageMonitorV2::CheckStatus()':
LabelManagerLanguageMonitorV2.cpp:72:21: error: 'time' was not declared in this scope
   72 |         beginTime = time(NULL);
      |                     ^~~~

And fix it with following pacth can make success:

diff --git a/src_v2/lm/LabelManagerLanguageMonitorV2.cpp b/src_v2/lm/LabelManagerLanguageMonitorV2.cpp
index 4ad5b99..cf32398 100644
--- a/src_v2/lm/LabelManagerLanguageMonitorV2.cpp
+++ b/src_v2/lm/LabelManagerLanguageMonitorV2.cpp
@@ -21,7 +21,7 @@
 #include "LabelManagerLanguageMonitorV2.h"
 
 #include <unistd.h>
-
+#include <ctime>
 namespace DymoPrinterDriver
 {
 
@@ -273,4 +273,4 @@ void CLabelManagerLanguageMonitorV2::ReprintPage()
     _printEnvironment.WriteData(_pageData);
 }
 
-};
\ No newline at end of file
+};

yingopq avatar Oct 28 '22 07:10 yingopq