OpenSSL libcrypto-1_1-x64.dll missing

Ronin825 picture Ronin825 · Mar 30, 2017 · Viewed 29.6k times · Source

i have started a project in C++ and need to implement some openssl libraries. I downloaded the libraries, followed the directions on how to install openssl.

it was a pain and had to install / reinstall multiple times for multiple reasons.

im finally able to seemingly correctly install openssl and compile the libraries, link them with -libcrypto and -libssl instead of the -lcrypto and -lssl i saw everywhere.

I have been through the process of debugging, my includes are fine and the implimentation seems to work because g++ find the error file and throws the compilation errors, but when it "Succesfully" compiles and i run the .exe i get this error.

enter image description here

I have searched my openssl intall location and i did find that file.

enter image description here

Here is my makefile code, all those location are clearly in the building path

# *- Makefile -*

compiler=g++
standLib=-lstdc++ -llibcrypto -llibssl
include=-I C:\openssl-1.1.0e\include 
ExtLibrary=-L C:\openssl-1.1.0e        // <--- LOCATION OF THE .dll FILE
outfile=-o main.exe

all : main.o fileReader.o main

clean :
    del *.o *.exe

main: main.o fileReader.o numbers.o
    $(compiler) main.o $(standLib) $(include) $(ExtLibrary) $(outfile)

main.o : main.cpp fileReader.cpp
    $(compiler) -c main.cpp $(standLib) $(include) $(ExtLibrary) 

fileReader.o : fileReader.cpp fileReader.h
    $(compiler) -c fileReader.cpp $(standLib) 

numbers.o : numbers.cpp numbers.h
    $(compiler) -c numbers.cpp $(standlib) 

What am i missing ? Thanks for any input or help !

** UPDATE **

i found that i can execute my program fine as long as its running in the same directory as openssl where the libcrypto-1_1-x64.dll is located.

How can i build my program so that it can run it on its own without openssl installed on the computer ? IE: if i want to give it to a friend who doesnt have openssl installed on his machine.

Answer

Gabriel Dias picture Gabriel Dias · Sep 24, 2020

To solve this issue you should just add openssl's /bin directory to your path (using environment variables).