Can't get OpenSSL to run on Windows (same code works fine on Linux)
-
Oh wait, I might have misunderstood you. Are you calling OpenSSL functions directly in your code ?
-
[quote author="SGaist" date="1398287845"]Oh wait, I might have misunderstood you. Are you calling OpenSSL functions directly in your code ?[/quote]
AFAIK he is, see the initial post.
-
[quote author="sierdzio" date="1398322738"][quote author="SGaist" date="1398287845"]Oh wait, I might have misunderstood you. Are you calling OpenSSL functions directly in your code ?[/quote]
AFAIK he is, see the initial post.[/quote]
Indeed, then the most likely problem is that the downloaded OpenSSL wasn't built with MinGW 64
-
@SGaist Thanks for the reply. I got OpenSSL from http://slproweb.com/products/Win32OpenSSL.html. It doesn't say what was used to build it, but I'm assuming it wasn't mingw.
So, I downloaded a mingw64 build of OpenSSL from http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.0/64-bit/.
The first problem is that there is no libeay.dll in this distribution and my app won't compile without it. I don't know where to get it or where it goes; there is no lib directory in my new OpenSSL directory, which is where libeay.dll usually lives.
Secondly, when I try to run the following perl script in the MINGW32:~ shell
perl Configure mingw -no-share -no-asm --prefix=/C/openssl-1.0.1g
I get the error "Can't open perl script "Configure": No such file or directory.
I found some folks online with the same error as above, but their solutions didn't apply or didn't work for me.
-
I thought I could just include the new OpenSSL in my qt app and let Qt Creator compile the SSL stuff, but without libeay.dll, I'm dead in the water.
-
Is it a static build of OpenSSL ?
-
I want it to be, otherwise I'd have to install OpenSSL on all the machines it will run on. At this point, I'd be happy with any build that works.
-
You wouldn't need to install OpenSSL on every machine, just deploy the dlls with your application.
Just stumble upon "this":http://qt-project.org/wiki/Compiling-OpenSSL-with-MinGW might help
-
Yeah, I've looked at that page many times. sierdzio included that link in this forum earlier. I cannot get those scripts to run (see previous posts).
I also tried running them in a mingw32:~ shell unsuccessfully (error = "Can't open perl script "Configure": No such file or directory). I also tried configure and ./configure and ./Configure, no dice.
-
Just to rule out the obvious, do you have perl installed ?
-
Yup. I installed Active Perl also and tried that. Changed paths,etc. It seems to run perl; it just doesn't know what configure is.
-
Just thought of something when reading your configure.exe line.
Since it can't find configure, are you building from the sources ?
If not, then it's the first thing to get. Next what you need to add to the configure line is:
@./configure.exe -openssl-linked -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib@