Wireshark-dev: Re: [Wireshark-dev] Error compiling a customdllpluginforWireshark0.99.7

From: "A Verma" <laughaloud43@xxxxxxxxx>
Date: Fri, 29 Feb 2008 11:30:25 +0530

Hi,
I made the Makefile.nmake & plugin.rc.in in plugins/xxx folder the same as that
in plugins/agentx and plugins/ciscosm folder the same. Executed a diff command to confirm that too.

Then I set the env and execute the commands at the top level.
1. nmake -f Makefile.nmake distclean
2. nmake -f Makefile.nmake all

But I got the following errors:

       cd agentx
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" /
          -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@PLUGIN_NAME@/agentx/  -e s/@RC_MODULE_VERSION@/0,0,1,0/  -e s/
@RC_VERSION@/0,99,9,0/  -e s/@MODULE_VERSION@/0.0.1.0/  -e s/@PACKAGE@/agentx/
-e s/@VERSION@/0.99.9"-XXX-YYY-01"/  -e s/@MSVC_VARIANT@/MSVC2005EE/  < plugin.r
c.in > agentx.rc
        rc  /r agentx.rc
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DMSC_VER_REQUIRED=1400 -Fd.\ -c packet-agentx.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

packet-agentx.c
plugin.c
Generating Code...
        link -dll /out:agentx.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386 /DEBUG p
acket-agentx.obj  plugin.obj ..\..\epan\libwireshark.lib  C:\wireshark-win32-lib
s\glib\lib\glib-2.0.lib  C:\wireshark-win32-libs\glib\lib\gmodule-2.0.lib  C:\wi
reshark-win32-libs\glib\lib\gobject-2.0.lib agentx.res
   Creating library agentx.lib and object agentx.exp
        cd ..
        cd artnet
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" /
          -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@PLUGIN_NAME@/artnet/  -e s/@RC_MODULE_VERSION@/0,0,3,0/  -e s/
@RC_VERSION@/0,99,9,0/  -e s/@MODULE_VERSION@/0.0.3.0/  -e s/@PACKAGE@/artnet/
-e s/@VERSION@/0.99.9"-XXX-YYY-01"/  -e s/@MSVC_VARIANT@/MSVC2005EE/  < plugin.r
c.in > artnet.rc
        rc  /r artnet.rc
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DMSC_VER_REQUIRED=1400 -Fd.\ -c packet-artnet.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

packet-artnet.c
plugin.c
Generating Code...
        link -dll /out:artnet.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386 /DEBUG p
acket-artnet.obj  plugin.obj ..\..\epan\libwireshark.lib  C:\wireshark-win32-lib
s\glib\lib\glib-2.0.lib  C:\wireshark-win32-libs\glib\lib\gmodule-2.0.lib  C:\wi
reshark-win32-libs\glib\lib\gobject-2.0.lib artnet.res
   Creating library artnet.lib and object artnet.exp
        cd ..
        cd asn1
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" /
          -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@PLUGIN_NAME@/asn1/  -e s/@RC_MODULE_VERSION@/0,5,0,0/  -e s/@R
C_VERSION@/0,99,9,0/  -e s/@MODULE_VERSION@/0.5.0.0/  -e s/@PACKAGE@/asn1/  -e s
/@VERSION@/0.99.9"-XXX-YYY-01"/  -e s/@MSVC_VARIANT@/MSVC2005EE/  < plugin.rc.in
 > asn1.rc
        rc  /r asn1.rc
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DMSC_VER_REQUIRED=1400 -Fd.\ -c packet-asn1.c asn1.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

packet-asn1.c
asn1.c
plugin.c
Generating Code...
        link -dll /out:asn1.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386 /DEBUG pac
ket-asn1.obj asn1.obj plugin.obj ..\..\epan\libwireshark.lib ..\..\wiretap\wiret
ap-0.3.1.lib  C:\wireshark-win32-libs\glib\lib\glib-2.0.lib  C:\wireshark-win32-
libs\glib\lib\gmodule-2.0.lib  C:\wireshark-win32-libs\glib\lib\gobject-2.0.lib
asn1.res
   Creating library asn1.lib and object asn1.exp
        cd ..
        cd ciscosm
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" /
          -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@PLUGIN_NAME@/ciscosm/  -e s/@RC_MODULE_VERSION@/0,0,1,0/  -e s
/@RC_VERSION@/0,99,9,0/  -e s/@MODULE_VERSION@/0.0.1.0/  -e s/@PACKAGE@/ciscosm/
  -e s/@VERSION@/0.99.9"-XXX-YYY-01"/  -e s/@MSVC_VARIANT@/MSVC2005EE/  < plugin
.rc.in > ciscosm.rc
        rc  /r ciscosm.rc
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DMSC_VER_REQUIRED=1400 -Fd.\ -c packet-sm.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

packet-sm.c
plugin.c
Generating Code...
        link -dll /out:ciscosm.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386 /DEBUG
packet-sm.obj  plugin.obj ..\..\epan\libwireshark.lib  C:\wireshark-win32-libs\g
lib\lib\glib-2.0.lib  C:\wireshark-win32-libs\glib\lib\gmodule-2.0.lib  C:\wires
hark-win32-libs\glib\lib\gobject-2.0.lib ciscosm.res
   Creating library ciscosm.lib and object ciscosm.exp
        cd ..
        cd xxx
        "C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.exe" /
          -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

Making plugin.c (using python)
        sed -e s/@PLUGIN_NAME@/xxx/  -e s/@RC_MODULE_VERSION@/0,6,5,0/  -e s/@RC
_VERSION@/0,99,9,0/  -e s/@MODULE_VERSION@/0.6.5.0/  -e s/@PACKAGE@/xxx/  -e s/@
VERSION@/0.99.9"-XXX-YYY-01"/  -e s/@MSVC_VARIANT@/MSVC2005EE/  < plugin.rc.in >
 xxx.rc
        rc  /r xxx.rc
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFIG_H
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC:\w
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdpack
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRE
CATE /DMSC_VER_REQUIRED=1400 -Fd.\ -c packet-xxx.c plugin.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

packet-xxx.c
C:\wireshark\epan/ftypes/ftypes-int.h(30) : fatal error C1083: Cannot open inclu
de file: 'pcre.h': No such file or directory
plugin.c
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.exe"' : return code '0x2'
Stop.

 Can somene pls help. Thanks!

regards,
Ash

 
On 2/29/08, Guy Harris <guy@xxxxxxxxxxxx> wrote:

On Feb 28, 2008, at 6:41 PM, Maynard, Chris wrote:

> I think this is your problem – the last line for the agentx plugin
> does not have the ".rc" whereas yours does (i.e., "rc  /r xxx.rc"
> vs. "rc  /r agentx").

Or, to put it another way:

       $ cd src/cmd/wireshark/plugins
       $ ls
       Custom.nmake.example    ethercat                rlm
       Makefile                giop                    rtnet
       Makefile.am             gryphon                 rudp
       Makefile.in             irda                    sbus
       Makefile.nmake          lwres                   stats_tree
       agentx                  m2m                     tpg
       artnet                  mate                    unistim
       asn1                    opcua                   v5ua
       ciscosm                 opsi                    wimax
       docsis                  pcli                    wimaxasncp
       easy_codec              plugins.vcproj
       enttec                  profinet
       $ diff agentx/Makefile.nmake artnet/Makefile.nmake
       $ diff agentx/Makefile.nmake rudp/Makefile.nmake
       $

I.e., the Makefile.nmake files for those three plugins are identical -
that's the case for many of the plugins.

In other words, unless you have a *REALLY* good reason, the
Makefile.nmake for your plugin should be identical to the
Makefile.nmake for the agentx plugin (except for the RCS ID).
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev