Reputation: 2544
I am trying to build and link OpenSSL on Windows 8 and I've found it really daunting. I should mention that I am aware of following posts
but none of them addressed what I do really need to know. Therefore I decided to share my experience with you guys as a new post!
First, I can successfully build and link OpenSSL on a Win32 OS and it perfectly works. I know that Windows 8 comes with WOW64. “WOW64 is an x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows”, though when I run my app that is built on windows 7 32-bit, I receive an error “The program can’t start because libeay32.dll is missing from your computer…” while “libeay32.dll” is apparently there and not missing.
In order to avoid registry missing stuffs, I tried to build OpenSSL in 32bit mode on Windows 8. The build was successfully done and the app linked correctly with no error. Again when I run the app I received the same error message.
And then I tried to build it in 64bit mode based on the following steps;
set PATH=%PATH%;c:\perl\bin;c:\nasm;
call "c:\visual studio\2012\vc\vcvarsall.bat" x64
perl Configure VC-WIN64A no-shared no-idea
call ms\do_win64a
copy ms\libeay32.def ms\libeay64.def /Y
copy ms\ssleay32.def ms\ssleay64.def /Y
ssed -e s/out32/out64/g ms\ntdll.mak | ssed … > ms\ntdll-64.mak
ssed -e s/out32/out64/g ms\nt.mak | ssed … > ms\nt-64.mak
nmake -f ms\ntdll-64.mak
nmake -f ms\ntdll-64.mak test
nmake -f ms\ntdll-64.mak install
In this case, I received a lot of warnings mostly on “data conversion and possibility of data loss” during build but it was built and while “test” failed “install” generated outputs.
Now when I try to build my solution in Visual Studio using new “libeay64.lib and ssleay64.lib” I receive almost thousands of errors saying “unresolved external symbol”
So if possible please answer following questions;
I am using OpenSSL ver 1.0.1e, Visual Studio 2012 and nasm 2.10.07
Thanks
Upvotes: 2
Views: 26571
Reputation: 9411
I am partially answering your question:
You can run 32-bit under 64-bit in WOW64.
For OpenSSL under 64-bit, there is a compiler option /WX under visual studio which means treat warnings as an error. Remove that compiler option from the makefile. You will get lots of warnings. But OpenSSL will get compiled.
Since, most of the modules are not compiled and their object file is not generated, that is why you are getting linker error. Please let me know if it solves your problem.
Upvotes: 1