#include Errors: cannot open the source file "openssl / bn.h", c...">

Cannot open source file "openssl / bn.h"

#include <openssl/dh.h> #include <openssl/bn.h> 

Errors: cannot open the source file "openssl / bn.h", cannot open the source file "openssl / dh.h" ??? what's wrong

+4
source share
4 answers
  • Make sure libssl is installed on the system. If you use linux command

    $ yum list libssl

  • If it is installed. Make sure you include the path in the include directory. If you use gcc, you can tell gcc to search the directory with

    -I / path_of_libssl folder

+3
source

You may not have indicated the inclusion path. If you are using Visual Studio, you should go to Tools-> Options-> Projects and Solutions-> C ++ Directories and select the "include files" option from the drop-down list and add the path to the includes openssl folder. Or you can simply copy the openssl folder to the sources folder and go to "openssl / bn.h".

+2
source

The problem is that your compiler cannot find the bn.h header file. The reason for this may be that there is something wrong with your include path.

It is also possible that you did not install the header files. Depending on your system, you need to install a package called something like libssl-dev. This package contains header files. The libssl package contains only shared object files (ending in .so), they are necessary for the build process, and not for the compilation process. If installing libssl-dev solves your problem and after that there is a problem with the linker, you should also install libssl.

+1
source

You either do not have this file or you don’t have the correct path to include.

0
source

Source: https://habr.com/ru/post/1339526/


All Articles