Wireshark-dev: [Wireshark-dev] error LNK2001: unresolved external symbol _mtp3_standard
Hello,
I have wrote a wireshark plugin and it was built successfully under
unix. But when building it under Windows, following error will
appear:
Generating Code...
link -dll /out:pmp.dll /NOLOGO /INCREMENTAL:no /MACHINE:I386
/DEBUG packet-pmp.obj plugin.obj ..\..\epan\libwi
eshark.lib C:\wireshark-libs-1.0\glib\lib\glib-2.0.lib
C:\wireshark-libs-1.0\glib\lib\gmodule-2.0.lib C:\wireshark-l
bs-1.0\glib\lib\gobject-2.0.lib pmp.res
Creating library pmp.lib and object pmp.exp
packet-pmp.obj : error LNK2001: unresolved external symbol _mtp3_standard
pmp.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\link.EXE"' : return code '0x460' Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2' Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2' Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.exe"' : return code '0x2' Stop.
I added following line plugins/pmp/packet-pmp.c to use the variable
mtp3_standard, because under epan/dissectors/, the variable is defined
in packet-mtp3.c and declared in packet-mtp3.h.
#include <epan/dissectors/packet-mtp3.h>
I did some search online, and it is saying that usually this error
means some .lib is not correctly linked.
Could someone tell me how to do it in wireshark?
Thanks & Regards
-Xiao