[openssl-users] Windows Compile Fails

Jay Foster jayf0ster at roadrunner.com
Fri Jun 19 15:30:51 UTC 2015

On 6/18/2015 7:55 PM, Thomas J. Hruska wrote:
> On 6/18/2015 4:46 PM, Jay Foster wrote:
>> I'm new to building OpenSSL with Windows. I'm trying to build OpenSSL
>> 1.0.2c for Windows, but get a linking error
>> tmp32dll\x86cpuid.obj : fatal error LNK1112: module machine type 'X86'
>> conflicts with target machine type 'x64'
>> I googled for this error, but the solutions mention changing parameters
>> in the VC Studio project, but I'm building from the command line with
>> nmake.
>> I'm configuring for 32-bit (perl Configure VC-WIN32 ...).  I think the
>> Windows system I'm compiling on is a 64-bit OS.  I know I have built
>> 32-bit applications on it in the past from VC Studio.  Is there some
>> obvious fix?
>> Jay
> What Command Prompt are you running?  You have to use the correct 
> "Native Tools" for the target hardware type.  If you are building 
> VC-WIN32, then you are targeting 32-bit hardware and need to run the 
> x86 Native Tools Command Prompt (not the x64 version).  You can't mix 
> and match targets.
> If you don't want to build it yourself, there are also prebuilt 
> binaries and libraries.
I tried again, but it then failed trying to compile an assembly file 
(i586 something).  It complained about an unknown operand.

I tried again adding "no-asm" to my configuration.  It seemed to compile 
fine, but again failed at the link with several undefined symbols:
_OPENSSL_ia32cap_P, _OPENSSL_ia32_cpuid, _md5_block_asm_data_order, 
_sha1_block_data_order, _sha256_block_data_order, and 

My goal is to obtain a static library(ies) and associated header files 
that I can use to compile my application that uses OpenSSL on Windows.  
Where can I obtain these pre-built binaries?


More information about the openssl-users mailing list