Skip to contentSkip to conversation

Compiling OpenVPN for Windows

Openvpn-devel Allan Swanepoel 5 participants 7 messages Sep 1, 2010 – Sep 2, 2010

lore
Share & tools
lore
#0 lore raw

Hi All, I'm fairly new to building openvpn for windows (have been building on Linux since 2.0),
I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

I have ZERO experience in building Windows software, and would really appreciate any pointers / assistance in this regard.
I have access to Visual Studio 2008 Standard, or any open source software I need.

Thanks in advance

Signature · 29 lines
We live in an age when pizza gets to your home before the police.
  - Jeff Marder
------------------------------------------
Allan Swanepoel
[email protected]...
[email protected]...
[email protected]...
+27 71 850 5554
Linux User #452990
Linux Machine #360914
-----------------------------------------------
IMPORTANT: This email is intended for the use of  the  individual
addressee(s)  named  above  and  may  contain information that is
confidential,  privileged  or  unsuitable  for  overly  sensitive
persons  with  low  self-esteem, no sense of humour or irrational
religious beliefs. If you are not  the  intended  recipient,  any
dissemination,  distribution  or copying  of  this  email is not
authorised (either explicitly or implicitly) and  constitutes  an
irritating  social  faux  pas. Unless the word absquatulation has been
used in its correct context somewhere  other  than  in  this warning,
it does not have any legal or grammatical use and may be ignored. No
animals were  harmed  in  the  transmission  of  this email,  although
 the  yorkshire  terrier  next door is living on borrowed time, let me
tell you. Those of you with an overwhelming fear  of  the unknown will
be gratified to learn that there is no hidden message revealed by
reading  this  warning  backwards,  so just ignore that Alert Notice
from Microsoft: However, by pouring a complete circle of salt around
yourself and your  computer  you can  ensure  that  no harm befalls
you and your pets.
#1 lore raw

Hi,

Quoted 5 lines · Allan Swanepoel

Hi All, I'm fairly new to building openvpn for windows (have been building on Linux since 2.0),
I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

You can do two things - cross-build with mingw under linux (producing openvpn.exe binaries for windows), or build with mingw+msys under windows.

If you want to do the latter, read the file "domake-win" in the OpenVPN source tree - it's the script that does the windows building, and it contains the instructions as well.

If you use the pre-compiled tun/tap driver from the 2.1.3 windows bundle, you don't need the MS DDK/WDK, just msys+mingw and the NSIS installer-builder.

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#2 lore raw
Quoted 13 lines · Gert Doering

Hi,

Quoted 5 lines · Allan Swanepoel

Hi All, I'm fairly new to building openvpn for windows (have been building on Linux since 2.0),
I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

You can do two things - cross-build with mingw under linux (producing openvpn.exe binaries for windows), or build with mingw+msys under windows.

Quoted 7 lines

If you want to do the latter, read the file "domake-win" in the OpenVPN source tree - it's the script that does the windows building, and it contains the instructions as well.

If you use the pre-compiled tun/tap driver from the 2.1.3 windows bundle, you don't need the MS DDK/WDK, just msys+mingw and the NSIS installer-builder.

Won't msys & mingw then become dependencies for running openvpn?

Quoted 8 lines

gert
--
USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...

Signature · 29 lines
We live in an age when pizza gets to your home before the police.
  - Jeff Marder
------------------------------------------
Allan Swanepoel
[email protected]...
[email protected]...
[email protected]...
+27 71 850 5554
Linux User #452990
Linux Machine #360914
-----------------------------------------------
IMPORTANT: This email is intended for the use of  the  individual
addressee(s)  named  above  and  may  contain information that is
confidential,  privileged  or  unsuitable  for  overly  sensitive
persons  with  low  self-esteem, no sense of humour or irrational
religious beliefs. If you are not  the  intended  recipient,  any
dissemination,  distribution  or copying  of  this  email is not
authorised (either explicitly or implicitly) and  constitutes  an
irritating  social  faux  pas. Unless the word absquatulation has been
used in its correct context somewhere  other  than  in  this warning,
it does not have any legal or grammatical use and may be ignored. No
animals were  harmed  in  the  transmission  of  this email,  although
 the  yorkshire  terrier  next door is living on borrowed time, let me
tell you. Those of you with an overwhelming fear  of  the unknown will
be gratified to learn that there is no hidden message revealed by
reading  this  warning  backwards,  so just ignore that Alert Notice
from Microsoft: However, by pouring a complete circle of salt around
yourself and your  computer  you can  ensure  that  no harm befalls
you and your pets.
#3 lore raw

Hi,

Quoted 5 lines · Allan Swanepoel
Quoted 3 lines

If you use the pre-compiled tun/tap driver from the 2.1.3 windows bundle, you don't need the MS DDK/WDK, just msys+mingw and the NSIS installer-builder.

Won't msys & mingw then become dependencies for running openvpn?

no. This is not cygwin :-) - msys is just the run-time for being able to run "bash" things on windows. mingw builds native windows binaries using native windows libraries (as opposed to gcc inside cygwin, which creates binaries that need the cygwin dll).

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#4 lore raw
In reply to Allan Swanepoel
Quoted 3 lines · Allan Swanepoel

I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

Maybe your Linux distribution offers a simple way to install a cross-compiler. Find out which host tuple you should use and then do something like:

./configure --host=i686-mingw32 --prefix=/tmp/openvpn && make install

in order to cross-compile openvpn sources. As Gert pointed out, binaries built with MinGW use public domain headers for the Win32 API implemented by Microsoft's runtime, so no dependency that is not met by any Windows system.

//Peter

#5 lore raw
In reply to Allan Swanepoel
Quoted 7 lines

Hi All, I'm fairly new to building openvpn for windows (have been building on Linux since 2.0),
I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

Quoted 5 lines

I have ZERO experience in building Windows software, and would really appreciate any pointers / assistance in this regard.
I have access to Visual Studio 2008 Standard, or any open source software I need.

I don't (yet) have any experience with building OpenVPN _on Windows_, but soon will. We got a Windows build computer now. I've heard from James that you need "Visual Studio Professional". "Standard" or "Express"(?) won't cut it. If you want to build the TAP driver you also need Windows Driver Kit (WDK). Of course you won't be able to sign the drivers with official OpenVPN key. Anyways, that's the extent of my knowledge for now. Eventually I'll write instructions on how to compile OpenVPN on Windows to our wiki:

<https://community.openvpn.net/openvpn/wiki>

This will take some time, so please don't hold your breath :). As Gert said, you can also cross-compile on *NIX, which I guess is easier for now.

Signature · 5 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock
#6 lore raw
Quoted 12 lines · Samuli Seppänen
Quoted 7 lines

Hi All, I'm fairly new to building openvpn for windows (have been building on Linux since 2.0),
I have a small customization that I make to the openvpn sourcecode to call external software on initialization, and would like to build a Windows build with this in.

Quoted 5 lines

I have ZERO experience in building Windows software, and would really appreciate any pointers / assistance in this regard.
I have access to Visual Studio 2008 Standard, or any open source software I need.

Quoted 4 lines

I don't (yet) have any experience with building OpenVPN _on Windows_, but soon will. We got a Windows build computer now. I've heard from James that you need "Visual Studio Professional". "Standard" or "Express"(?) won't cut it.

If true, it would be interesting to know why Express isn't enough.

I have had a lot of success using Express CLI tools under Linux/WINE (works perfectly), generally with NMAKE makefiles (though perhaps CMake, etc, would also work).

--Toby

Quoted 29 lines

If you want to build the TAP driver you also
need Windows Driver Kit (WDK). Of course you won't be able to sign the drivers with official OpenVPN key. Anyways, that's the extent of my knowledge for now. Eventually I'll write instructions on how to compile OpenVPN on Windows to our wiki:

<https://community.openvpn.net/openvpn/wiki>

This will take some time, so please don't hold your breath :). As Gert said, you can also cross-compile on *NIX, which I guess is easier for now.

Signature · 17 lines
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel