GiacomoLaw / Keylogger

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

Unable to compile Script #99

Closed Snowdrop20 closed 3 years ago

Snowdrop20 commented 3 years ago

C:\Users\anon\Desktop\Keylogger-master\windows\klog_main.cpp: In function 'int Save(int)': C:\Users\anon\Desktop\Keylogger-master\windows\klog_main.cpp:91:66: error: 'strcpy_s' was not declared in this scope strcpy_s(lastwindow, sizeof(lastwindow), window_title); ^

C:\Users\anon\Desktop\Keylogger-master\windows\klog_main.cpp:96:32: error: 'localtime_s' was not declared in this scope localtime_s(&tm, &t);

StanislasG commented 3 years ago

Hey! Thanks to the compile errors from the compiler I found a way. By changing following lines I could compile the program. If someone understand it more precisely, I would like to understand why it happened in the first place :-) (I used g++ compiler from MinGW on Windows 10)

[line 54] MessageBox(NULL, (char *) a, (char *) b, MB_ICONERROR); [line 91] strcpy(lastwindow, window_title); [line 96] localtime(&t);