Thanks for you support. Could someone hep me for the following complile error?

link -dll /out:gtpcdr.dll /NOLOGO /INCREMENTAL:no /DEBUG /MACHINE:x86 /SafeSEH /DYNAMICBASE /FIXED:no  packet-gtpcdr.obj  plugin.obj ..\..\epan\libwireshark.lib  C:\wireshark-win32-libs-1.8\gtk2\lib\glib-2.0.lib  C:\wireshark-win32-libs-1.8\gtk2\lib\gmodule-2.0.lib  C:\wireshark-win32-libs-1.8\gtk2\lib\gobject-2.0.lib gtpcdr.res
plugin.obj : error LNK2005: _version already defined in packet-gtpcdr.obj
   Creating library gtpcdr.lib and object gtpcdr.exp
gtpcdr.dll : fatal error LNK1169: one or more multiply defined symbols found
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x491'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

asked 28 Mar '13, 07:24

steve21's gravatar image

steve21
11235
accept rate: 0%

converted to question 28 Mar '13, 11:29

Guy%20Harris's gravatar image

Guy Harris ♦♦
11.0k226140


If the variable named version in packet-gtpcdr.c is a plugin version number, get rid of it - that's already taken care of in plugin.c.

If the variable named version in packet-gtpcdr.c is not a plugin version number, but is a variable used in the process of dissecting packets, either rename it or make it a local variable rather than a global variable (global variables are discouraged in dissectors).

link

answered 28 Mar '13, 11:32

Guy%20Harris's gravatar image

Guy Harris ♦♦
11.0k226140
accept rate: 17%

Below is the code for variable named version. What do you suggest to modify?

#ifndef ENABLE_STATIC
G_MODULE_EXPORT const guint8 version[] = VERSION;
#endif

#ifndef ENABLE_STATIC
G_MODULE_EXPORT void
plugin_reg_handoff(void){
    proto_reg_handoff_gtpcdr();
}
G_MODULE_EXPORT void
plugin_register (void) {
    if (proto_gtpcdr == -1)
        proto_register_gtpcdr();
}
#endif
(28 Mar '13, 14:54) steve21

If that code is in packet-gtpcdr.c, I suggest you remove all of it. That code should be in plugin.c, and probably already is in plugin.c.

(28 Mar '13, 14:58) Guy Harris ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1

Asked: 28 Mar '13, 07:24

Seen: 276 times

Last updated: 28 Mar '13, 14:58

Related questions

powered by OSQA