[stunnel-users] Windows builds

Josealf.rm josealf at rocketmail.com
Wed Nov 16 15:31:41 CET 2016


Michael,

You need OpenSSL header files and libraries. Note the fatal error.
If you downloaded and compiled openssl for 64bit, you need to ensure the compiler and linker finds them by setting the INCLUDE and LIB environment variables.

Regards
Jose

> El 16/11/2016, a las 8:45 a.m., Michael Curran <mike_curran at hotmail.com> escribió:
> 
> I hit enter too soon, adding some details below -- My apologies
> 
> 
> 
>  
> From: stunnel-users <stunnel-users-bounces at stunnel.org> on behalf of Michael Curran <mike_curran at hotmail.com>
> Sent: Wednesday, November 16, 2016 7:42 AM
> To: stunnel-users at stunnel.org
> Subject: [stunnel-users] Windows builds
>  
> Hello --
> 
> 
> Are there some solid instructions for building stunnel on windows? I am using Microsoft VS 2015 and the 64-bit compilers --
> 
> 
> I had no issues building Openssl-fips and openssl using the fips modules, but stunnel doesnt appear to find them. 
> 
> 
> This is the basic error I am running into, but could be that stunnel wont work with 64-bit?
> 
> C:\stunnel_build\stunnel-5.36.tar\stunnel-5.36\src>.\makew32.bat
> W32 ENVIRONMENT OK
> 
> Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> Detected target: win64
> 
>         cl /MD /W3 /O2 /nologo /I"\devel\win64\openssl\include" /DUNICODE /D_UNICODE -Fo..\obj\win64\stunnel.obj -c ..\src\stunnel.c
> stunnel.c
> c:\stunnel_build\stunnel-5.36.tar\stunnel-5.36\src\common.h(414): fatal error C1083: Cannot open include file: 'openssl/opensslconf.h': No such file or directory
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
> Stop.
> 
> 
> I did adjust the makew32.bat as follows
> 
> @echo off
> TITLE W32 STUNNEL 
> :: In a multi-target compilation environment, it is better to open
> :: a new cmd.exe window in order to avoid PATH pollution
> :: (for example with some previous WCE compilation attempts)
> 
> set NEWTGTCPU=W64
> 
> rem Adjust the MS VC environment variables
> rem ---------------------
> 
> rem Detect the latest Visual Studio
> rem Visual Studio 2008
> if DEFINED VS90COMNTOOLS if exist "%VS90COMNTOOLS%..\..\vc\vcvarsall.bat" set vsTools=%VS90COMNTOOLS%
> rem Visual Studio 2010
> if DEFINED VS100COMNTOOLS if exist "%VS100COMNTOOLS%..\..\vc\vcvarsall.bat" set vsTools=%VS100COMNTOOLS%
> rem Visual Studio 2012
> if DEFINED VS110COMNTOOLS if exist "%VS110COMNTOOLS%..\..\vc\vcvarsall.bat" set vsTools=%VS110COMNTOOLS%
> rem Visual Studio 2013
> if DEFINED VS120COMNTOOLS if exist "%VS120COMNTOOLS%..\..\vc\vcvarsall.bat" set vsTools=%VS120COMNTOOLS%
> rem Visual Studio 2015
> if DEFINED VS140COMNTOOLS if exist "%VS140COMNTOOLS%..\..\vc\vcvarsall.bat" set vsTools=%VS140COMNTOOLS%
> 
> ::rem Initialize the Visual Studio tools
> ::call "%vsTools%..\..\vc\vcvarsall.bat"
> 
> rem Check the MSenv variables against our reference values
> set isenvok=0
> if NOT DEFINED TARGETCPU set TARGETCPU=XXXXX
> if "%NEWTGTCPU%"=="%TARGETCPU%"  set /A "isenvok+=1"
> 
> if %isenvok%==1 echo W32 ENVIRONMENT OK
> if %isenvok%==1 goto envisok
> 
> :: Useless with separated target folders
> ::echo W32 TARGET CPU changed, destroying every obj files
> ::del .\*.obj
> 
> :: if env is NOT ok, adjust the MS VC environment variables
> :: (this is to avoid repetitive pollution of PATH)
> 
> echo W32 ENVIRONMENT ADJUSTED
> 
> :: Reset of INCLUDE is needed because of accumulation of includes in vcvars32
> 
> set INCLUDE=
> 
> call "%vsTools%..\..\vc\bin\amd64\vcvars64.bat"
> 
> set TARGETCPU=%NEWTGTCPU%
> 
> :envisok
> 
> rem Make everything
> rem ---------------
> 
> nmake.exe -f vc.mak %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> 
> _______________________________________________
> stunnel-users mailing list
> stunnel-users at stunnel.org
> https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20161116/d403d787/attachment.html>


More information about the stunnel-users mailing list