GiacomoLaw / Keylogger

A simple keylogger for Windows, Linux and Mac
https://simple-keylogger.github.io/
MIT License
2.06k stars 617 forks source link

Unable to compile Script #136

Closed waseeld closed 11 months ago

waseeld commented 1 year ago
PS C:\Users\PC\Desktop\Keylogger-master\windows> mingw32-gcc.exe .\klog_main.cpp
.\klog_main.cpp: In function 'int Save(int)':
.\klog_main.cpp:132:57: error: 'strcpy_s' was not declared in this scope
    strcpy_s(lastwindow, sizeof(lastwindow), window_title);
                                                         ^
.\klog_main.cpp:137:23: error: 'localtime_s' was not declared in this scope
    localtime_s(&tm, &t);
                   ^

i saw https://github.com/GiacomoLaw/Keylogger/issues/99 but it dosent help me lol

GiacomoLaw commented 11 months ago

Using MinGW? Localtime_s doesn't work on stuff outside Windows compilers.

Try adding this:

define localtime_r(T,Tm) (localtime_s(Tm,T) ? NULL : Tm)

Does this help?

GiacomoLaw commented 11 months ago

Duplicate of #133