Wireshark-dev: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7
From: "A Verma" <laughaloud43@xxxxxxxxx>
Date: Sat, 1 Mar 2008 23:45:30 +0530
Hi,
Thanks so mich for your response. I shall take about the point related to diif threads that you mentioned.
 
I made the changed to makefile.namke, but got the follwoing errors:

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\pcre-7.

0\include /IC:\wireshark-win32-libs\WPdpack\include -D_U_="" /Zi /W3 /MD /D_CRT_

SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /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

packet-xxx.c(1077) : error C2220: warning treated as error - no 'object' file ge

nerated

packet-xxx.c(1077) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

packet-xxx.c(1078) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

packet-xxx.c(1079) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

packet-xxx.c(1103) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

packet-xxx.c(1104) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

packet-xxx.c(1105) : warning C4244: '=' : conversion from 'time_t' to 'unsigned

int', possible loss of data

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 someone pls help.
 
thanks,
Ash

 
On 3/1/08, Maynard, Chris <Christopher.Maynard@xxxxxxxxx> wrote:

OK, I guess because our toolchains differ slightly the output was a bit different and I was led astray.  Sorry about that; my stupid error.  The last problem you had was probably due to something with your version naming, but regardless, I think I've found the root cause of your problem.  You need to modify your plugin's Makefile.nmake.  Actually, I think all the Wireshark plugins need their Makefile.nmake files modified.

 

Currently the CFLAGS is set to this:

CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \

        /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)

 

It needs to be change to this:

CFLAGS=/WX /DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \

        $(PCRE_CFLAGS) /I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)

 

By the way, in the future, it might help resolve your problem faster by discussing it in a single thread.  There's no need to start 4 or 5 different threads that all reference the same problem.

 

Good luck,

Chris

 


From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of A Verma
Sent: Friday, February 29, 2008 1:00 AM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Error compiling acustomdllpluginforWireshark0.99.7

 

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

 


This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof.


_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev