[stunnel-users] Help - Getting stunnel compiled on windows and using a patch

Reinier van der Gugten info at rgit.eu
Fri Nov 14 10:48:00 CET 2008

Thanks so mucht for this information!
I had to make the folowing changes as well:
Set the Compile with common language runtime to: No common language
runtime support for each .h file 
If I do that, the error: Command line error D8045: cannot compile C file
'src\client.c' with the /clr option disappears
(Next I got an error in the resouce.rc file with the LTEXT VERSION... So
I // that out)
Next I get about 121 errors, like:
Error LNK2001: unresolved external symbol _main
... symbol _num_clients
Any ideas?
Kind regards,


From: DMILE525 [mailto:dmile525 at gmail.com] 
Sent: donderdag 13 november 2008 23:23
To: Reinier van der Gugten
Subject: Re: [stunnel-users] Help - Getting stunnel compiled on windows
and using a patch

on Windows:
install Win32 OpenSSL http://www.slproweb.com/products/Win32OpenSSL.html
install VS2008 (I'm using free VS2008 C++ Express Edition
http://www.microsoft.com/express/download/> )

The first thing to do (assuming a default installation of 'C:\OpenSSL')
is to go to 'C:\OpenSSL\lib\VC' and copy all of the files to your Visual
C++ 'lib' directory. This directory is sometimes located in a somewhat
cryptic location such as 'C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\lib' or 'C:\Program Files\Microsoft Visual Studio 9.0\VC\lib'.

Next, copy everything in the 'C:\OpenSSL\include' directory to your
Visual C++ 'include' directory.

create new empty project
add to project:
stunnel.c ssl.c ctx.c verify.c file.c client.c protocol.c sthreads.c
log.c options.c network.c resolver.c gui.c  
common.h prototypes.h resources.h stunnel.ico resources.rc
"Configuration properties -> Linker -> input -> additional properties"
add wsock32.lib ssleay32.lib libeay32.lib
"Configuration properties -> General -> character set" set "Use
Multi-Byte Character Set"

in common.h  after 

#ifndef COMMON_H
#define COMMON_H


#define USE_WIN32
#ifndef _MBCS
#define _MBCS
#define VERSION "4.26"
#if defined _M_IX86
#pragma comment(linker, "/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version=''
processorArchitecture='x86' publicKeyToken='6595b64144ccf1df'
#elif defined _M_IA64
#pragma comment(linker, "/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version=''
processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df'
#elif defined _M_X64
#pragma comment(linker, "/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version=''
processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df'
#pragma comment(linker, "/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version=''
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'

On Wed, Nov 12, 2008 at 6:50 PM, Reinier van der Gugten <info at rgit.eu>

	I am trying to compile STunnel. I'd rather not, but the
pre-compiled version does not support a proxy server. 
	So I hop you will be able to help me, or point me to a good
howto on how to compile stunnel using windows and a patch from the
patch-list. Or does someone have a compiled (windows) version with proxy
support? If so, please mail it to me.
	Or tell me where to find more detailed information pls. - Next
thing I will try is to install linux on a computer in order to try it
that way...

	stunnel-users mailing list
	stunnel-users at mirt.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20081114/edbb9ad1/attachment.html>

More information about the stunnel-users mailing list