[Snort-users] Compiling snort on Win32

Chris Reid chris.reid at ...3029...
Fri May 31 14:20:13 EDT 2002


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 at ...5528...>
To: <snort-users at 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 at 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
>






More information about the Snort-users mailing list