This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

WS_VAR_IMPORT does not name a type

0

While compiling the dissector on linux i am getting the fallowing error does anybody know the solution to this

wireshark-1.4.7/epan/prefs.h:167: error: WS_VAR_IMPORT does not name a type

asked 17 Jul '11, 23:58

sagu072's gravatar image

sagu072
35232428
accept rate: 0%


One Answer:

0

Make sure to include config.h before prefs.h in your dissector, like so:

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

answered 18 Jul '11, 01:51

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

edited 18 Jul '11, 01:52

I have included that but still getting the error. my code is in C++, so do i need to use both g++ and gcc compilers ?

(18 Jul '11, 01:56) sagu072

Note Wireshark is a C project, no C++.

Did you work with namespaces?

(18 Jul '11, 04:16) Jaap ♦

ya i do use namespace and i have included that in source.

(18 Jul '11, 05:33) sagu072

Then you may be doing that wrong. See here.

(18 Jul '11, 08:20) Jaap ♦