Nmap Development mailing list archives

Re: win32 compile error


From: "Rob Nicholls" <robert () everythingeverything co uk>
Date: Thu, 11 Oct 2007 14:20:30 +0100 (BST)

Sorry, I should have spotted this sooner. The file windows.h is actually
in /usr/include/w32api, so you need to make sure this is included in the
search path.

I figured you'd made some private changes, as there aren't many other
reasons why people would want to compile 4.20 from source :)

And if all that doesn't work, at least you should be able to use the free
edition of Visual C++ 2005 Express Edition (+ the SDK) as "Plan B" ;)


Rob


I did in fact include the /usr/lib/w32api directory but couldn't find
windows.h in it at all.

Any other place I can get this or find it? I actually do have the latest
cygwin installed already. Unfortunately I have patched nmap for some
private
usages and need to compile this myself on windows, else I would just
download it.

TF.


On 10/11/07, Rob Nicholls <robert () everythingeverything co uk> wrote:

For reference, instructions on how to compile nmap on Windows are
available here:

http://insecure.org/nmap/install/inst-windows.html#inst-win-source

This states "Many people have asked whether Nmap can be compiled with
the
gcc/g++ included with Cygwin or other compilers. Some users have
reported
success with this, but we don't maintain instructions for building Nmap
under Cygwin" (probably because most Windows users grab the binaries).

I'd like to quickly point out that I managed to compile SVN rev 5916
okay
using Visual Studio .NET 2003 after modifying all of the .vcproj files
to
say "7.10" instead of "8.00" so there's no need to grab 2005 if you have
either version of VS.NET (as I suspect it'd work in VS.NET 2002 by
changing "8.00" to "7.00", although I've not tried this).

Getting back on topic, I believe the windows.h file is part of the
w32api
files that are released by cygwin (I think MinGW have their own version
of
windows.h too). There are plenty of mirrors
(http://www.cygwin.com/mirrors.html):

http://cygwin.osuosl.org/release/w32api/
http://mirror.calvin.edu/cygwin/release/w32api/

http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/release/w32api/

The files may already be on your machine (e.g.
c:\cygwin\usr\lib\w32api),
I think there have been issues in the past where the setup program put
files directly in /usr/lib/w32api rather than in /lib/w32api (and if you
try and access the folder in bash, you'll probably get an error
message),
so you may find that installing the latest version of cygwin, or moving
the w32api folder (using Windows) from c:\cygwin\usr\lib\w32api into
c:\cygwin\lib\w32api might fix things.

Good luck!


Rob


Trying to compile nmap, getting the following error..

1>c:\cygwin\home\peter\nmap-4.20\nbase\nbase_winunix.h(111) : fatal
error
C1083: Cannot open include file: 'windows.h': No such file or
directory

it appears over and over... is it not finding the SDK or something?
how
can
I fix this?

Any help really appreciated.

thanks
TF.

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org






_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: