Nmap Development mailing list archives

Nmap build fails on MSVC 2013 with Windows SDK 10


From: 食肉大灰兔V5 <hsluoyz () gmail com>
Date: Wed, 15 Jun 2016 15:53:01 +0800

Hi list,

I git cloned the latest source from https://github.com/nmap/nmap/, then
launched mswin32\nmap.sln, and tried to build the Debug Win32 version.

My env is Windows 10 x64 + MSVC 2013 + Windows SDK 10.0.10586 + WDK
10.0.10586

Some errors are:

1>------ Rebuild All started: Project: nbase, Configuration: Debug Win32
------
2>------ Rebuild All started: Project: libpcre, Configuration: Debug Win32
------
3>------ Rebuild All started: Project: libdnet-stripped, Configuration:
Debug Win32 ------
4>------ Rebuild All started: Project: liblua, Configuration: Debug Win32
------
5>------ Rebuild All started: Project: libnetutil, Configuration: Debug
Win32 ------
6>------ Rebuild All started: Project: liblinear, Configuration: Debug
Win32 ------
7>------ Rebuild All started: Project: nmap-update, Configuration: Debug
Win32 ------
1>  strcasecmp.c
6>  dscal.c
6>  dnrm2.c
6>  ddot.c
6>  daxpy.c
6>  Generating Code...
6>  tron.cpp
7>  svn_auth.c
6>  linear.cpp
1>j:\github_repos_others\nmap\nbase\nbase_ipv6.h(164): error C2373:
'inet_pton' : redefinition; different type modifiers
1>          c:\program files (x86)\windows
kits\8.1\include\um\ws2tcpip.h(560) : see declaration of 'inet_pton'
1>j:\github_repos_others\nmap\nbase\nbase_ipv6.h(176): error C2373:
'inet_ntop' : redefinition; different type modifiers
3>  strsep.c
1>          c:\program files (x86)\windows
kits\8.1\include\um\ws2tcpip.h(576) : see declaration of 'inet_ntop'
1>  snprintf.c
3>  strlcpy.c



I did a little search about "ws2tcpip.h", and it exists in several places:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\WS2tcpip.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\um\WS2tcpip.h
C:\Program Files (x86)\Windows Kits\8.1\Include\um\WS2tcpip.h
C:\Program Files (x86)\Windows Phone Kits\8.1\Include\ws2tcpip.h
C:\Program Files (x86)\Windows Phone Silverlight Kits\8.1\Include\ws2tcpip.h

From the error, it seems that Nmap uses SDK 8.1 instead of the 10 version.
I didn't install SDK 8.1 explicitly, but it seems that SDK 10 also installs
some 8.1 files.

I looked at the https://nmap.org/book/inst-windows.html, and it doesn't see
which version SDK I should use. Maybe I'm using the wrong version? What's
the official env for building nmap? MSVC 2013 + SDK 8.1? Thanks.


Cheers,
Yang
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: