Question

Quoting the instructions for building OpenSSL:

Then from the VC++ environment at a prompt do:

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.

Looks like I am missing setup of some environment variable that will point to where unistd.h. Not sure what it is though.

Was it helpful?

Solution

Copy C:\Program Files\Microsoft Visual Studio 9.0\VC\Include\io.h under the name unistd.h in the same directory and retry the build.

OTHER TIPS

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 a command prompt, run this batch file. It will define environment variables pointing to various installation directories, including where various standard header files are installed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top