Help! Can not build openvpn-2.3 on Win7

Weekly dev snapshots are available for testing.
We talk about them here. Testing features in the dev snapshot helps the features make it to stable.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please report your experience with testing branch. Include what you were using and how
If there is a problem, the more info the better!
Post Reply
chandler
OpenVpn Newbie
Posts: 4
Joined: Wed Feb 27, 2013 2:34 pm

Help! Can not build openvpn-2.3 on Win7

Post by chandler » Wed Feb 27, 2013 2:38 pm

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?

mokk
OpenVPN User
Posts: 21
Joined: Thu Dec 30, 2010 2:03 am

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

Post by mokk » Sun Mar 03, 2013 5:20 pm

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.

Post Reply