0

i'm trying to encrypt file by openssl and a got this errors

Severity    Code    Description Project File    Line    Suppression State
Error   C4996   'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.   ConsoleApplication1 C:\Users\dell\source\repos\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp  43  

to resolve i add this command

#define _CRT_SECURE_NO_DEPRECATE 

and i got this errors:

Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol AES_set_encrypt_key referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cipher_AES(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?cipher_AES@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@0@Z)    ConsoleApplication1 C:\Users\dell\source\repos\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.obj  1   

what can i do?

Alan Birtles
  • 32,622
  • 4
  • 31
  • 60
  • Welcome to Stackoverflow. It is always a good idea to include a small running example of the code that is giving the error. So kindly edit (https://stackoverflow.com/posts/63879154/edit) your post and add the data. Please wrap your code in the code-tags, thanks. – Michael Fehr Sep 14 '20 at 06:41
  • Presumably you need to link to the openssl libraries – Alan Birtles Sep 14 '20 at 06:56

0 Answers0