I once wrote Makefile.MingW, but lack of time and motivation kept me
from updating it to the mailing-list. Now I can say that some things are wrongfully assumed about gcc (i.e. non-MSVC or MingW) on Windows: * That IPv6 isn't available. Wrongity wrong for years. Only non-gcc builds have "#define INET6". In fact, ntop/Win32 doesn't even built w/o INET6 defined. Try the attached makefile.MingW with "USE_IPV6 = 0".

* That the WinPcap header-layout are different than it is on *nix. On current
 WinPcap, it's the same. So ntop.h shouldn't even have this section:
  #if defined(WIN32) && defined(__GNUC__)
  #include "bpf.h"
  #include "pcap.h"
  #endif

There are more problems. Back later.

----- Original Message ----- From: "Rich Rumble" <[email protected]>
To: <[email protected]>
Sent: Wednesday, March 23, 2011 1:39 PM
Subject: [Ntop-dev] Win32 Makefile.mingw


I've noticed the Makefile.mingw and BUILD-MinGW.txt haven't kept up
with the latest releases. I've attempted to make some corrections
but since I don't really understand what I'm doing I'm sure I've made
a mess of things :) Attached is a diff of what I've done, I've searched
through all the SVN logs to make sure I could delete what I have and
I think this is OK, but I'm still not able to make Ntop. I'm not sure
if the errors I'm getting are due to Mingw or a combination of the changes
that have taken place over the years and the changes I made to the
makefile. I'm hoping someone with more experience can update it
properly so it will make with the 4.x branches. Below are the errors
I'm recieving, which may be due to me not using the proper version
of python.h?? I used 3.x, but this may be incorrect. Most if not all
of the rrd stuff has been gutted by me because I believe much of it
is not needed anymore with this branch, same with the gdchart stuff.
Anyway if anyone can help shed some light I'd be happy to test
and try any suggestions!
I'm using the latest SVN 4527. The MinGW files haven't been updated
since 2004 (rev 2472)
Thanks!
-rich
===Errors===
make -f Makefile.mingw depend (no issues...)
make -f Makefile.mingw
$ make -f Makefile.mingw
gcc -O2 -Wall -g -I. -I./libpcap -I./libpcap/bpf/net
-I./libpcap/Win32/include -I./Graphics/libpng -I./gdbm -DHAVE_FCNTL_H
-D
HAVE_PCAP_H -DHAVE_STDARG_H -DHAVE_PCAP_OPEN_DEAD
-DHAVE_PCAP_LIB_VERSION -DHAVE_STRFTIME -DHAVE_MATH_H -DHAVE_INT8_T
-DHAVE_
INT16_T -DHAVE_INT32_T -DHAVE_UINT8_T -DHAVE_UINT16_T -DHAVE_UINT32_T
-I./OpenSSL/outinc -DHAVE_OPENSSL -DOPENSSL_NO_KRB5 -o
MingW_obj/ntop.o -c ntop.c
In file included from ntop.h:343:0,
                from ntop.c:24:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/bpf.h:68:15:
error: expected '=', ',', ';', 'asm' or '__attribute__
' before 'bpf_u_int32'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/bpf.h:89:2:
error: expected specifier-qualifier-list before 'u_int'

c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/bpf.h:105:2:
error: expected specifier-qualifier-list before 'u_sho
rt'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/bpf.h:1043:2:
error: expected specifier-qualifier-list before 'u_sh
ort'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/bpf.h:1057:14:
error: expected '=', ',', ';', 'asm' or '__attribute
__' before 'bpf_filter'

I think this is because '-DHAVE_u_int8_T' etc. are missing from that makefile.
Please try the attached one and report back.

--gv

Attachment: makefile.MingW
Description: Binary data

_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to