Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] sample dissector

From: Sebastien Tandel <sebastien@xxxxxxxxx>
Date: Fri, 16 Feb 2007 13:04:00 +0100
>> greetings All,
>>
>> I know that this sounds boring (a new wireshark dissector is in the
>> block), but no matter how I tackel this problem it beats be off.
>>
>> I'm following on the README.developer instructions in that after I
>> craft my dissector, I only need to place the file into the dissector/
>> directory having a name of packet-foo.c and adding this last name to
>> the DISSECTOR_SRC macro.
>>
>> problem is that, whenever I compile wireshark, starting at the top
>> level directory, I get libwireshark undefined reference to
>> proto_register_foo ?!
>>     
>
> Where did you change DISSECTOR_SRC?  If you changed it in "Makefile.am" 
> or "Makefile.in" then you must also run automake or autogen.sh (not sure 
> which) or ./configure to propogate that change into the real "Makefile".
>
> Or you could just change it in the Makefile.
>   
IMHO, it is better to change it in Makefile.am followed by a
./autogen.sh which will create the Makefile.in. Then run ./configure
which creates Makefile. (If you already had run ./configure before the
changes you can even run directly make which will run automatically
configure with the same set of options as before)

Be aware that if you decide to only change Makefile. All changes will be
lost if you run again ./autogen.sh or ./configure which is desired if
the update of your working tree affects some Makefile.am.

but I guess it does not tackle his problem as README.developer states
that DISSECTOR_SRC is in epan/dissectors/Makefile.common ... :-/


Regards,
Sebastien Tandel