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

Error LNK2019

0

Hi,

I'm trying to create a new dissector based on the tftp disector. For that I copy/cut packet-tftp.c from epan/dissector/ to a new folder /dissector/myProject. I replaced "tftp" by "myDissector" in this file. During the compilation, I get an error like this:

packet-myDissector.obj : error LNK2019: symbole externe non résolu tvb_get_seasonal_string référencé dans la fonction dissect_myDissector_message myDissector.dll : fatal error LNK1120: 1 external non résolus.

The tvb_get_seasonal_string is in the tvbuff.c file, but tftp use other fonction from this file and it does'nt crash. I don't understand why 'im getting this error, can someone explain to me how to fix this error plz.

Thx Alrik

asked 11 Jan '11, 04:38

Alrik's gravatar image

Alrik
1334
accept rate: 0%


2 Answers:

1

The libwireshark.dll exports only functions that are defined in the libwireshark.def file. The entries in the .DEF file are usually added on request. That means that the export list of the current Wireshark distribution is always somewhat behind the requirements.

You can modify the .def file, and verify that it will fullfill your requirements. Than you can send the change request to the core development team and you might get a compatible Libwireshark.dll in the next version. But you need to tell you dissector users to update to this 'next version'.

answered 26 Mar '11, 05:17

harper's gravatar image

harper
312
accept rate: 0%

0

I'm not sure where you placed your file, it should go into /epan/dissectors/ and should be added to Makefile.common

See /doc/README.developer section 1.2 and 1.9

answered 11 Jan '11, 06:32

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

The other plugins I wrote are in the /plugins/ folder, and worked succesfully. I read that it can be caused by the missing declaration of tvb_get_seasonal_string in libwireshark.def file, when I add it, it seems to work. But, is there any other solution, because I don't want to modify the libwireshark.def file?

(11 Jan '11, 06:41) Alrik