I am writing a C++ program where I need to find the sha512 hash of a file at one point so I'm thinking of using the openssl library from https://github.com/openssl/openssl/tree/master/include/openssl . I have downloaded the whole openssl repository but I guess I only need the include/openssl folder so I deleted the rest. Now I have no idea how to tell my compiler to look for sha.h in the openssl folder. One way I tried is by going to my codeblocks settings>compiler>linker settings and then adding all the files present inside the openssl folder and then writing include <openssl/sha.h>
but its not working although I am getting a suggestion as you can see in this image . When I hit build and run I get the error E:\CodeBlocks\C++\test\main.cpp|2|fatal error: openssl/sha.h: No such file or directory| . I am new to using third party libraries and have never done it.
The problem is not with OpenSSL, but with your lack of knowledge how to use CodeBllocks to tell the compiler where your libraries are.
In Code::Blocks 20.3 (Linux) you need to
Project
from the main menu Project/targets options
Project build options
Search directories
tab Compiler
tab Add
buttonRemember that you show to the compiler additional (to the default ones) path(s) where it has to look for headers, not individual header files themselves.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.