Cannot build OpenVPN 2.3.1 in Windows 7 (64 bit)

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

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

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
aywu
OpenVpn Newbie
Posts: 3
Joined: Tue Apr 02, 2013 5:43 pm

Cannot build OpenVPN 2.3.1 in Windows 7 (64 bit)

Post by aywu » Tue Apr 02, 2013 6:10 pm

I have started building 2.3.1 in Windows 7. Here is my environment:
- Windows 7,
- Microsoft Visual Studio Express 2012 for Windows Desktop.
- OpenVPN 2.3.0 source downloaded from http://openvpn.net/index.php/download.html (Community Downloads -> Source Zip)

I mainly followed the instructions of this link:
http://ehsanakhgari.org/blog/2008-05-04 ... pn-windows

I was able to build OpenSSL and LZO fine. but when I was trying build OpenVPN, I am getting:
.
.
init.c(186) : error C2143: syntax error : missing ';' before 'type'
init.c(187) : error C2065: 'out' : undeclared identifier
init.c(187) : warning C4133: 'function' : incompatible types - from 'int *' to 'buffer *'
init.c(189) : error C2065: 'out' : undeclared identifier
init.c(189) : warning C4133: 'function' : incompatible types - from 'int *' to 'const buffer *'
init.c(208) : error C2061: syntax error : identifier 'management_callback_remote_cmd'
init.c(208) : error C2059: syntax error : ';'
init.c(208) : error C2059: syntax error : 'type'
init.c(3132) : error C2065: 'management_callback_remote_cmd' : undeclared identifier
init.c(3132) : warning C4047: '=' : 'bool (__cdecl *)(void *,const char **)' differs in levels of indirection from 'int'
.
.

Here is init.c:
.
.
ce_management_query_proxy (struct context *c)
{
const struct connection_list *l = c->options.connection_list;
struct connection_entry *ce = &c->options.ce;
struct gc_arena gc;
bool ret = true;

update_time();
if (management)
{
gc = gc_new ();
struct buffer out = alloc_buf_gc (256, &gc); // line 186
buf_printf (&out, ">PROXY:%u,%s,%s", (l ? l->current : 0) + 1,
(proto_is_udp (ce->proto) ? "UDP" : "TCP"), np (ce->remote));
management_notify_generic (management, BSTR (&out));
ce->flags |= CE_MAN_QUERY_PROXY;
while (ce->flags & CE_MAN_QUERY_PROXY)
{
management_event_loop_n_seconds (management, 1);
if (IS_SIG (c))
{
ret = false;
break;
}
}
gc_free (&gc);
}

return ret;
}
.
.

Here are some of questions:
1) I am new to OpenVPN. is v2.3.1 the right version for me to build the source in Windows 7 platform? If it is not, can you kindly point me to the most suitable to be able to build in Windows 7 (64 bit)?
2) Where is the best instructions (web link please) to build in Windows 7?
3) Do I need to build tap-windows sub-project?
4) Why am I getting the above compile error?

Appreciate for your kind helps!

Alan Wu

aywu
OpenVpn Newbie
Posts: 3
Joined: Tue Apr 02, 2013 5:43 pm

Re: Cannot build OpenVPN 2.3.1 in Windows 7 (64 bit)

Post by aywu » Fri Apr 05, 2013 7:02 pm

I have figured out the solution and the problem is solved.

hendry
OpenVpn Newbie
Posts: 4
Joined: Mon Apr 01, 2013 5:56 pm

Re: Cannot build OpenVPN 2.3.1 in Windows 7 (64 bit)

Post by hendry » Sat May 25, 2013 4:11 pm

aywu wrote:I have started building 2.3.1 in Windows 7. Here is my environment:
.

Here are some of questions:
1) I am new to OpenVPN. is v2.3.1 the right version for me to build the source in Windows 7 platform? If it is not, can you kindly point me to the most suitable to be able to build in Windows 7 (64 bit)?
2) Where is the best instructions (web link please) to build in Windows 7?
3) Do I need to build tap-windows sub-project?
4) Why am I getting the above compile error?

Hi , I got the same error , could you pls post how you fixed ? thank you in advance
and 3) Do I need to build tap-windows sub-project? I have this question too .....
thank you again

Post Reply