I'm get errors building NTOP 3.0 for Win32 with Visual C++. I'm using the latest version from CVS and building it with Visual C++ 6 (SP5) using the sample project file (ntopvc6). I got NTOP 2.2 running on Win32 last year using MinGW and GCC with some code changes. That version crashes under some conditions and I'd like to upgrade to 3.0 and try building NTOP with VC++. A description of the build environment and issues I had to deal with or need help with are outlined below. Basic Environment ================= NTOP 3.0.050 (from CVS) VC6 SP5 GDBM for Win32 from www.roth.net GD 2.0.23 LIBPNG 1.2.5 ZLIB 1.1.14 Build Errors ============ The first group or errors is caused by undeclared identifiers. The other errors are for the GD library and have something to do with an invalid use of dllimport or dllexport. The error message are listed below: %BASE%\Source\Ntop-src\PLUGINS\icmpPlugin.c(722) : error C2065: 'fileName' : undeclared identifier %BASE%\Source\Ntop-src\webInterface.c(7446) : error C2065: 'sockIn' : undeclared identifier %BASE%\Source\Ntop-src\webInterface.c(7447) : error C2224: left of '.sin_family' must have struct/union type %BASE%\Source\Ntop-src\webInterface.c(7448) : error C2224: left of '.sin_port' must have struct/union type %BASE%\Source\Ntop-src\webInterface.c(7463) : error C2224: left of '.sin_addr' must have struct/union type %BASE%\Source\legacy\gd\gdfontg.c(4380) : error C2491: 'gdFontGiant' : definition of dllimport data not allowed %BASE%\Source\legacy\gd\gdfontl.c(4637) : error C2491: 'gdFontLarge' : definition of dllimport data not allowed %BASE%\Source\legacy\gd\gdfontmb.c(3867) : error C2491: 'gdFontMediumBold' : definition of dllimport data not allowed %BASE%\Source\legacy\gd\gdfonts.c(3867) : error C2491: 'gdFontSmall' : definition of dllimport data not allowed %BASE%\Source\legacy\gd\gdfontt.c(2588) : error C2491: 'gdFontTiny' : definition of dllimport data not allowed Error executing cl.exe. ntop.exe - 10 error(s), 490 warning(s) Build Warnings ============== Rebuilding the VC++ project creates a few hundred or so warnings. Many of them may be normal. Some like undefined references to "strcmp" or "strlen" might be a problem. I'd like to know what kind of compilation errors are expected when building NTOP for Win32. config.h ======== There isn't an ntop "config.h" file built for Win32. Does that cause problems? The VC++ compiler resolves it to the config.h file for "myrrd" (using the include list in the VC++ project). dirent ====== There isn't a "dirent.h" file, though it is referenced by "dirent.c" and other files. I was able to find an updated version of "dirent.c" and a copy of "dirent.h" at http://www.two-sdg.demon.co.uk/curbralan/code/dirent/. Using those files I was able to get "dirent.c" to compile and resolve the include errors for "dirent.h". GDBM for Win32 ============== I downloaded it from the www.roth.net sight as suggested. When building NTOP two of the files for GDBM in the VC++ project file were not found. The "hash.c" and "version.c" files needed to be renamed to "gdbmhash.c" and "gdbmversion.c". Miscellaneous ============= There is no "version.c" file. I made one based on the ntop 2.2 file. The VC++ project file references a file called "netflow.c" that isn't in the release. Is this file needed to use the Netflow? I removed the file from the VC++ project for now. Thanks for your help. - Lew


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

Reply via email to