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

error: ‘dissect_…’ undeclared here (not in a function)

0

Hello, community. I keep getting this error in the ...fn.c file while compiling my dissector. What would be the reason for it?

Best regards Ewgenij

asked 17 Dec '12, 02:36

Ewgenijkkg's gravatar image

Ewgenijkkg
668915
accept rate: 60%


2 Answers:

0

OK, I figured it out :-) My main ASN.1 file imported structure definitions from other ASN.1 files. But these files were absent in the dissector development folder. Nor did I use them as input arguments in the asn2wrs call. Nevertheless asn2wrs compiler did not report any errors. The errors became obvious later, at compile time of the resulting C-Sources. That was the error output I asked my question for.

Hmm, actually I would expect asn2wrs to notice the missing files to be included. Why doesn't it do that?

BR

Ewgenij

answered 08 Jan '13, 06:48

Ewgenijkkg's gravatar image

Ewgenijkkg
668915
accept rate: 60%

1

Hi, You need to give more background for some one to be able to answer. I think you asked about asn2wrs before if that's the case your problem might be that that functions are declared in the wrong order you may have to do a forward declaration of the function or move the include. Look at other template files.

answered 17 Dec '12, 04:57

Anders's gravatar image

Anders ♦
4.6k952
accept rate: 17%

Hello, thank you for the answer. What background would help? Actually, this error occurs a lot of time and concerns different asn objects...

(18 Dec '12, 04:38) Ewgenijkkg

If you are planning to release your dissector to Wireshark we could set up the asn directory and actually see your source files which would be easier. Otherwise a small piece of the template file and some more of the error log might help.

(18 Dec '12, 06:14) Anders ♦