Page 1 of 1

Help! Can not build openvpn-2.3 on Win7

Posted: Wed Feb 27, 2013 2:38 pm
by chandler
I followed the instructions in this URL:https://community.openvpn.net/openvpn/w ... uildsystem
The build process of openvpn-2.3 follow the bash script called "build" under the generic directory, the main process is:

Code: Select all

main() {
export CFLAGS="${TARGET_CFLAGS} ${EXTRA_TARGET_CFLAGS}"
export LDFLAGS="${TARGET_LDFLAGS} ${EXTRA_TARGET_LDFLAGS}"
download
create_layout
extract
build_dep
if [ -z "${DO_ONLY_DEPS}" ]; then
build_openvpn
[ -n "${BUILD_FOR_WINDOWS}" ] && build_openvpn_gui
copy_docs
copy_sources
clean_empty_dirs
pack
fi
}
And I have succefully build all the dependencies.That is I have finished: download create_layout extract build_dep of the main process, only left the build_openvpn, I run into a lot of problems when I tried to build the final binary--openvpn.

1, unrecognized command line option '-municode'

I searched the Makefile and found "am__append_1 = -municode -UUNICODE", and deleted "-municode", and run make again, that problem passed, but run into another:

2, ntddndis.h:No such file or directory

I found the file in C:\MinGW\include\ddk, so I copy it to generic/image/openvpn, and again the compiled said it can not find ntddk.h which I also found under C:\MinGW\include\ddk, so I add C:\MinGW\include\ddk to the include path and make again

3, this time I got too many errors and warnings concerning redefinition and redeclaration of
ASSERT
enum_PARTITION_STYLE
PARTITION_STYLE_MBR
_DRIVE_LAYOUT_INFORMATION_GPT
and many more...

BTW:

I also install the windk from http://www.microsoft.com/en-us/download ... x?id=11800, and include the default installation directory:C:\WinDDK\7600.16385.1\inc\api, but still failed to build. The error information is a little different from the former.

What can I do? How can I comlete the last step of building openvpn?

Re: Help! Can not build openvpn-2.3 on Win7

Posted: Sun Mar 03, 2013 5:20 pm
by mokk
I don't know if it will help you, however...
OpenVPN depends on three things: OpenSSL 1.0.1e, LZO 2.06, pkcs11-helper 1.10. And if you use Windows SDK 8, you don't need an old WinDDK, so using Windows SDK 8 is a bit easier.