Wireshark-dev: Re: [Wireshark-dev] [Wireshark plugin build]: Error while compiling plugin
From: shreejith bl <shreejithbl@xxxxxxxxx>
Date: Fri, 19 Jun 2009 13:07:20 -0700 (PDT)
I copied config.h.win32 to config.h in c:\wireshark.
Now I am getting the below error.

I can see in config.h declarations which the compiler is not understanding like,
@HAVE_LIBPCAP@
@HAVE_PCAP_BREAKLOOP@
@HAVE_PCAP_FINDALLDEVS@
@HAVE_PCAP_DATALINK_NAME_TO_VAL@
@HAVE_PCAP_DATALINK_VAL_TO_NAME@
@WPCAP_CONSTIFIED@
@HAVE_LIBWIRESHARKDLL@

@HAVE_PCAP_LIST_DATALINKS@
@HAVE_PCAP_SET_DATALINK@

@HAVE_REMOTE@
@HAVE_PCAP_REMOTE@
@HAVE_PCAP_OPEN@
@HAVE_PCAP_FINDALLDEVS_EX@
@HAVE_PCAP_CREATESRCSTR@
@HAVE_PCAP_SETSAMPLING@

@HAVE_AIRPCAP@
@HAVE_AIRPDCAP@

Thanks in advance,
Shreejith
 
Error,
***********************************************
C:\wireshark\plugins\pluginA>nmake Makefile.nmake "VERSION = " -all /C
        cl /DHAVE_WIN32_LIBWIRESHARK_LIB /D_NEED_VAR_IMPORT_ /WX /DHAVE_CONFI
 /I../.. /I../../wiretap /IC:\wireshark-win32-libs\glib\include\glib-2.0  /IC
ireshark-win32-libs\glib\lib\glib-2.0\include  /IC:\wireshark-win32-libs\WPdp
\include -D_U_="" /Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DE
CATE /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1500 /D_BIND_TO_CURRENT_CRT_VER
N=1 /c packet-boa.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x
Copyright (C) Microsoft Corporation.  All rights reserved.

packet-boa.c
C:\wireshark\config.h(61) : error C2018: unknown character '0x40'
C:\wireshark\config.h(61) : error C2018: unknown character '0x40'
C:\wireshark\config.h(62) : error C2018: unknown character '0x40'
C:\wireshark\config.h(62) : error C2061: syntax error : identifier 'HAVE_PCAP
EAKLOOP'
C:\wireshark\config.h(62) : error C2059: syntax error : ';'
C:\wireshark\config.h(62) : error C2018: unknown character '0x40'
C:\wireshark\config.h(63) : error C2018: unknown character '0x40'
C:\wireshark\config.h(63) : error C2018: unknown character '0x40'
C:\wireshark\config.h(64) : error C2018: unknown character '0x40'
C:\wireshark\config.h(64) : error C2061: syntax error : identifier 'HAVE_PCAP
TALINK_NAME_TO_VAL'
C:\wireshark\config.h(64) : error C2059: syntax error : ';'
C:\wireshark\config.h(64) : error C2018: unknown character '0x40'
C:\wireshark\config.h(65) : error C2018: unknown character '0x40'
C:\wireshark\config.h(65) : error C2018: unknown character '0x40'
C:\wireshark\config.h(66) : error C2018: unknown character '0x40'
C:\wireshark\config.h(66) : error C2061: syntax error : identifier 'WPCAP_CON
FIED'
C:\wireshark\config.h(66) : error C2059: syntax error : ';'
C:\wireshark\config.h(66) : error C2018: unknown character '0x40'
C:\wireshark\config.h(67) : error C2018: unknown character '0x40'
C:\wireshark\config.h(67) : error C2018: unknown character '0x40'
C:\wireshark\config.h(69) : error C2018: unknown character '0x40'
C:\wireshark\config.h(69) : error C2061: syntax error : identifier 'HAVE_PCAP
ST_DATALINKS'
C:\wireshark\config.h(69) : error C2059: syntax error : ';'
C:\wireshark\config.h(69) : error C2018: unknown character '0x40'
C:\wireshark\config.h(70) : error C2018: unknown character '0x40'
C:\wireshark\config.h(70) : error C2018: unknown character '0x40'
C:\wireshark\config.h(72) : error C2018: unknown character '0x40'
C:\wireshark\config.h(72) : error C2061: syntax error : identifier 'HAVE_REMO

C:\wireshark\config.h(72) : error C2059: syntax error : ';'
C:\wireshark\config.h(72) : error C2018: unknown character '0x40'
C:\wireshark\config.h(73) : error C2018: unknown character '0x40'
C:\wireshark\config.h(73) : error C2018: unknown character '0x40'
C:\wireshark\config.h(74) : error C2018: unknown character '0x40'
C:\wireshark\config.h(74) : error C2061: syntax error : identifier 'HAVE_PCAP
EN'
C:\wireshark\config.h(74) : error C2059: syntax error : ';'
C:\wireshark\config.h(74) : error C2018: unknown character '0x40'
C:\wireshark\config.h(75) : error C2018: unknown character '0x40'
C:\wireshark\config.h(75) : error C2018: unknown character '0x40'
C:\wireshark\config.h(76) : error C2018: unknown character '0x40'
C:\wireshark\config.h(76) : error C2061: syntax error : identifier 'HAVE_PCAP
EATESRCSTR'
C:\wireshark\config.h(76) : error C2059: syntax error : ';'
C:\wireshark\config.h(76) : error C2018: unknown character '0x40'
C:\wireshark\config.h(77) : error C2018: unknown character '0x40'
C:\wireshark\config.h(77) : error C2018: unknown character '0x40'
C:\wireshark\config.h(79) : error C2018: unknown character '0x40'
C:\wireshark\config.h(79) : error C2061: syntax error : identifier 'HAVE_AIRP
'
C:\wireshark\config.h(79) : error C2059: syntax error : ';'
C:\wireshark\config.h(79) : error C2018: unknown character '0x40'
C:\wireshark\config.h(80) : error C2018: unknown character '0x40'
C:\wireshark\config.h(80) : error C2018: unknown character '0x40'
C:\wireshark\config.h(205) : error C2018: unknown character '0x40'
C:\wireshark\config.h(205) : error C2061: syntax error : identifier 'HAVE_LIB
C:\wireshark\config.h(205) : error C2059: syntax error : ';'
C:\wireshark\config.h(205) : error C2018: unknown character '0x40'
C:\wireshark\config.h(208) : error C2018: unknown character '0x40'
C:\wireshark\config.h(208) : error C2018: unknown character '0x40'
C:\wireshark\config.h(212) : error C2018: unknown character '0x40'
C:\wireshark\config.h(212) : error C2061: syntax error : identifier 'HAVE_GNU
NS'
C:\wireshark\config.h(212) : error C2059: syntax error : ';'
C:\wireshark\config.h(212) : error C2018: unknown character '0x40'
C:\wireshark\config.h(217) : error C2018: unknown character '0x40'
C:\wireshark\config.h(217) : error C2018: unknown character '0x40'
C:\wireshark\config.h(220) : error C2018: unknown character '0x40'
C:\wireshark\config.h(220) : error C2061: syntax error : identifier 'HAVE_NET
'
C:\wireshark\config.h(220) : error C2059: syntax error : ';'
C:\wireshark\config.h(220) : error C2018: unknown character '0x40'
C:\wireshark\config.h(223) : error C2018: unknown character '0x40'
C:\wireshark\config.h(223) : error C2018: unknown character '0x40'
C:\wireshark\config.h(226) : error C2018: unknown character '0x40'
C:\wireshark\config.h(226) : error C2061: syntax error : identifier 'HAVE_LIB
YPT'
C:\wireshark\config.h(226) : error C2059: syntax error : ';'
C:\wireshark\config.h(226) : error C2018: unknown character '0x40'
C:\wireshark\config.h(229) : error C2018: unknown character '0x40'
C:\wireshark\config.h(229) : error C2018: unknown character '0x40'
C:\wireshark\config.h(235) : error C2018: unknown character '0x40'
C:\wireshark\config.h(235) : error C2061: syntax error : identifier 'HAVE_LUA
C:\wireshark\config.h(235) : error C2059: syntax error : ';'
C:\wireshark\config.h(235) : error C2018: unknown character '0x40'
C:\wireshark\config.h(236) : error C2018: unknown character '0x40'
C:\wireshark\config.h(236) : error C2018: unknown character '0x40'
C:\wireshark\config.h(239) : error C2018: unknown character '0x40'
C:\wireshark\config.h(239) : error C2061: syntax error : identifier 'HAVE_LIB
TAUDIO'
C:\wireshark\config.h(239) : error C2059: syntax error : ';'
C:\wireshark\config.h(239) : error C2018: unknown character '0x40'
C:\wireshark\config.h(241) : error C2018: unknown character '0x40'
C:\wireshark\config.h(241) : error C2018: unknown character '0x40'
C:\wireshark\config.h(244) : error C2018: unknown character '0x40'
C:\wireshark\config.h(244) : error C2061: syntax error : identifier 'HAVE_SMI
C:\wireshark\config.h(244) : error C2059: syntax error : ';'
C:\wireshark\config.h(244) : error C2018: unknown character '0x40'
C:\wireshark\config.h(247) : error C2018: unknown character '0x40'
C:\wireshark\config.h(247) : error C2018: unknown character '0x40'
C:\wireshark\config.h(255) : error C2018: unknown character '0x40'
C:\wireshark\config.h(255) : error C2061: syntax error : identifier 'INET6'
C:\wireshark\config.h(255) : error C2059: syntax error : ';'
C:\wireshark\config.h(255) : error C2018: unknown character '0x40'
C:\wireshark\config.h(258) : error C2018: unknown character '0x40'
C:\wireshark\config.h(258) : error C2018: unknown character '0x40'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourcean
ations.h(19) : error C2054: expected '(' to follow 'HAVE_NTDDNDIS_H'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourcean
ations.h(19) : error C2085: 'size_t' : not in formal parameter list
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourcean
ations.h(25) : error C2085: 'wchar_t' : not in formal parameter list
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourcean
ations.h(25) : fatal error C1003: error count exceeds 100; stopping compilati
NMAKE :  U1077: 'cl' : return code '0x2'
Stop.

**ERROR**
System Call Failed current return_code Sumation = 258
buildboa.bat:
                 Make sure you have run run_before_wireshark_build.bat or use
cvars to set your VC++ environment
                 Also, be sure wireshark is not currently running. at build_b
tsnc_interface.pl line 391.

Removing temp directory... Cleanup complete.
**********************************************************


From: Bill Meier <wmeier@xxxxxxxxxxx>
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Sent: Friday, June 19, 2009 11:32:04 AM
Subject: Re: [Wireshark-dev] [Wireshark plugin build]: Error while compiling plugin

shreejith bl wrote:
> Hello all,
>
> I am trying to build a plugin.dll. I am using the wireshark sources from the revision HEAD (latest source).
> I am using VC++ 2008 Express Edition. Same was the case with VS .NET 2003.
>
> I am getting the following error. Can someone please help me in this regard?
>
> Thanks,
> Shreejith
>
> Error,
> *****************************************************
> C:\wireshark\plugins\pluginA>nmake Makefile.nmake "VERSION = " -all /C
>        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 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1500 /D_BIND_TO_CURRENT_CRT_VERSIO
> N=1 /c packet-boa.c
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> packet-boa.c
> c:\wireshark\epan\ftypes/ftypes.h(256) : error C2054: expected '(' to follow 'WS
> _VAR_IMPORT'

WS_VAR_IMPORT isn't defined. It's defined in config.h in the top-level
Wireshark directory.

Do you have the following as the first include in your plugin
(packet-boa.c) ?

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe