Skip to contentSkip to conversation

How to modify the OpenVPN code and build it using msys for Windows

Openvpn-devel Anmol Jain 2 participants 2 messages Jun 18, 2011 – Jun 20, 2011

lore
Share & tools
lore

Anmol Jain

author
#0 lore raw

Hi All

I have very recently started working on OpenVPN. I need to make some changes to the source code for my requirement. I am working on a windows machine and have installed mingw and msys. I was able to generate the OpenVPN installer for windows by modifying the settings.in to include pre-built libraries but my aim is to make some changes in the code and then install that. When I made a simple change in a C file misc.c and re-built the installer the change didn't reflect. When I did gcc misc.c it gave me the error that not able to find config.h which is included in syshead.h (which is included in misc.c originally). Basically I do not know how to build this code and use the binaries generated thereby for creating the installer. Can anyone please help?

Thanks,
Anmol

#1 lore raw

Il 18/06/2011 18:12, Anmol Jain ha scritto:

Quoted 15 lines

Hi All

I have very recently started working on OpenVPN. I need to make some changes to the source code for my requirement. I am working on a windows machine and have installed mingw and msys. I was able to generate the OpenVPN installer for windows by modifying the settings.in <http://settings.in> to include pre-built libraries but my aim is to make some changes in the code and then install that. When I made a simple change in a C file misc.c and re-built the installer the change didn't reflect. When I did gcc misc.c it gave me the error that not able to find config.h which is included in syshead.h (which is included in misc.c originally). Basically I do not know how to build this code and use the binaries generated thereby for creating the installer. Can anyone please help?

Quoted 3 lines

Thanks,
Anmol

Hi Anmol,

There are two ways to build OpenVPN on Windows. The older method is to use MinGW/Msys. Afaik all you need to know is documented in the "domake-win" script. The newer method uses Visual Studio 2008+ tools and is documented here:

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

These two buildsystems are entirely independent: if you're using the MinGW method you won't need Visual Studio for anything, and vice versa.

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

irc freenode net: mattock