How to fix openssl error when including my library

0

The error he gives me is this:

  

|| === Build: Debug in cheke (compiler: GNU GCC Compiler) === |   main.cpp | 15 | fatal error: openssl / md5.h: No such   file or directory | || === Build failed: 1 error (s), 0 warning (s) (0   minute (s), 0 second (s)) === |

However, I included it in the following way:

#include <openssl/md5.h>
#include <openssl/des.h>

Still, it keeps giving me error and without recognizing it. I'm using the mingw compiler and it's supposed to be for my mingw since I downloaded it for mingw. Someone knows how it could be solved or what the problem is. Anything I can contribute to detail more.

I'm doing from console and with ide, the ide that I use is codeblocks but it does not have much to do. I still have the same problem.

Capture: Current error:

  

In file included from main.cpp: 15: 0: openssl / md5.h: 62: 27: fatal error:   openssl / e_os2.h: No such file or directory #include                              ^ compilation terminated.

Code and error of the file:

  

gcc unwand.cpp -I "include" -lcrypto -o unwand unwand.cpp: In function   'int main (int, char **)': unwand.cpp: 42: 60: error: 'malloc' was not   declared in this scope unsigned char * wandData = (unsigned char   *) malloc (fileSize);                                                               ^ unwand.cpp: 182: 15: error: 'free' was not declared in this scope
  free (wandData);

    
asked by Perl 17.11.2016 в 19:19
source

1 answer

1

try with:

g++ main.cpp -L"directorio" -lcrypto -I"directorio/include" -o ejecutable

where "directory" is the folder where the .a files are

adds:

#include <stdlib.h>
    
answered by 17.11.2016 / 21:16
source