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

So many issues changing from MSVC 2013 compiler to MSVC 2012 Compiler

0

I am trying to build a plugin using the 1.12.7 source code of wireshark. I began using MSVC 2013 to compile my code, but now I have switched to MSVC 2012. I have uninstalled MSVC 2013 and have changed all the variables to MSVC (the MSVC Variant, my command line call, my Qt version) but now whenever I compile my plugin it completely crashes. It gives me >100 errors like " error c2275: 'dissector_handle_t' : illegal use of this type as an expression. c:\development\wireshark-1.12.7\epan/packet.h(88) : see declaration of 'dissector_handle_t" and similar ones about each guint__ variable proto_item and proto_tree, exc.

It recognizes the types but for some reason it can't resolve me using them.

I'm very confused and frustrated, can you think of any reason this might be happening?

Thanks,

asked 24 Aug '15, 15:48

j-demars's gravatar image

j-demars
416613
accept rate: 0%


One Answer:

0

If you're planning to build a plug-in that works with the 1.12.x release versions of Wireshark then you should use VS2010 SP1, as that's the compiler used for those versions, as detailed in the Developers Guide.

Also note that building the Qt version isn't recommended for 1.12.x, it's very much just an experiment, use the 1.99.x sources for Qt builds.

answered 25 Aug '15, 00:31

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

I have changed everything so that I am now using MSVC 2010 with SP1, but I am still getting the same errors.

(25 Aug '15, 15:54) j-demars

What's the output of nmake -f Makefile.nmake verify_tools?

(26 Aug '15, 02:45) grahamb ♦

I figured out what the issue is: I was declaring guints in the middle of a method (ie: not immediately after a { - which is okay for cpp files) and since the 2013 is smart enough to see that that's what that is, it was letting it fly, but going back to the old version of MSVCs made it break. Declaring the variables right after the { in each section of the code solved all my issues! Thanks!

(26 Aug '15, 14:20) j-demars