Compiling OpenSSL on Windows

Specifying instructions for creating OpenSSL:

Then from the VC ++ environment at the tip:

nmake -f ms \ ntdll.mak

When I do this I get

     cl /Fotmp32\cryptlib.obj  -Iinc32 -Itmp32 /MT /Ox /O2 /Ob2 /W3 /WX /Gs0
/GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_W
IN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE /Fdout32 -DOPENSSL_N
O_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS
 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_KRB5 -DOPENSSL_NO_DYNAMIC_
ENGINE /Zl -c .\crypto\cryptlib.c
cryptlib.c
tmp32\e_os.h(438) : fatal error C1083: Cannot open include file: 'unistd.h': No
such file or directory
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.

      

It looks like I'm missing the setting of some environment variable that will point to where unistd.h is. Not sure what it is.

+2


source to share


2 answers


Copy C:\Program Files\Microsoft Visual Studio 9.0\VC\Include\io.h

under the name unistd.h

in the same directory and try building again.



+2


source


Look in the Common7 / Tools subdirectory where Visual Studio is installed (for a typical installation C: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ Tools) for a batch file named vsvars32.bat. When you open Command Prompt, run this batch file. It will define environment variables pointing to various installation directories, including where the various standard header files are installed.



0


source







All Articles