Snort mailing list archives

Re: Compiling snort on Win32


From: "Chris Reid" <chris.reid () codecraftconsultants com>
Date: Fri, 31 May 2002 15:18:23 -0600

Ian,

I talked with Chris Green about this yesterday.  I had already planned on
providing him with a new Visual Studio project for Snort 1.8.6 tonight
(Friday).

Currently, there should be hundreds of warnings, but only one link error.
The link error should indicate that one of the "log" source files is
missing.  As part of my Visual Studio project update tonight, I was also
going to give Chris some diff's to snort.h (already found in the 1.9 source)
which reduce the warnings down to about 24.

If you just can't wait  ;)  here is how you can compile a clean 1.8.6
executable:

*  Open snort.h

*  Locate the include of <math.h>, and change it to:

    #ifdef WIN32
        #pragma warning( disable : 4028 )
    #endif /* WIN32 */
    #include <math.h>
    #ifdef WIN32
        #pragma warning( default : 4028 )
    #endif /* WIN32 */

*  Further down in snort.h, locate:

    /* This is basically everything needed to make snort work under
WIN32. -- Mike Davis */
    #ifdef WIN32
        #include <winsock.h>
        #include <windows.h>
        #include <io.h>
        #include <sys/timeb.h>
        #include <process.h>
        #include <direct.h>
        #include <getopt.h>
        typedef unsigned char  u_int8_t;
        typedef unsigned short u_int16_t;
        typedef unsigned int   u_int32_t;
        typedef int            pid_t;

    and change it to:

    /* This is basically everything needed to make snort work under
WIN32. -- Mike Davis */
    #ifdef WIN32
        #include <winsock.h>
        #include <windows.h>
        #pragma warning( disable : 4028 )
        #include <io.h>
        #include <process.h>
        #pragma warning( default : 4028 )
        #include <sys/timeb.h>
        #include <direct.h>
        #include <getopt.h>
        typedef unsigned char  u_int8_t;
        typedef unsigned short u_int16_t;
        typedef unsigned int   u_int32_t;
        typedef int            pid_t;

*  Compile.  This should still generate the link error.  Look at the error
to figure out which "log" source file is missing.  Add this file to your
Visual Studio project, and compile again.

Chris Reid


----- Original Message -----
From: "Ian Macdonald" <secsnort () dirk demon co uk>
To: <snort-users () lists sourceforge net>
Sent: Friday, May 31, 2002 3:56 PM
Subject: [Snort-users] Compiling snort on Win32



I have a couple changes I would like to make to the snort.exe binary, so I
thought I would download the 1.8.6 and see if I can compile it myself.

Can anyone point me to a document describing how to compile on windows? I
found the snort.dsp and snort.dsw files in win32/win32-prj an started up
Visual Studio 6, but I get alot of errors when I try to do a build

What are the prerequisites I need before being able to compile snort on
w32?

Thanks


Ian


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users




_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://www.geocrawler.com/redir-sf.php3?list=snort-users


Current thread: