Hello,

I have tried to put bitwise-and(&) into the display filter Dialog box's sources, made proper and necessary changes that are required (like calling the bitwise-and related function (ftype_can_bitwise_and) from ftypes/ftypes.c same as the other operator functions are called). There are no compile-time errors but at the end I'm facing a linker error called :

Linking wireshark.exe
        link @C:\DOCUME~1\admin\LOCALS~1\Temp\nm1C1.tmp
libui.lib(dfilter_expr_dlg.obj) : error LNK2019: unresolved external symbol _ftype_can_trig referenced in function _show_relations
wireshark.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.

Please help.

This question is marked "community wiki".

asked 07 Oct '11, 00:18

Terrestrial%20shark's gravatar image

Terrestrial ...
66212828
accept rate: 42%

edited 07 Oct '11, 05:25

grahamb's gravatar image

grahamb ♦
8.7k224125


As I can't find the symbol ftype_can_trig anywhere in the svn tree for trunk nor in the function show_relations, I'm assuming this is something you've added.

If this is the case you will also need to add it to the list of exported functions in epan\libwireshark.def so that code outside of libwireshark can use it.

link

answered 07 Oct '11, 01:15

grahamb's gravatar image

grahamb ♦
8.7k224125
accept rate: 17%

edited 07 Oct '11, 01:16

thanks Grahamb. Im trying to put triggers so i have defined a function called ftype_can_trig but it didnt allow. I have tried to add bitwise and as it is already present but not activated. Finally i made the code little messy.

(07 Oct '11, 01:23) Terrestrial ...

I have also include one of my variable from epan/ftypes/ftypes.h into the libwireshark.def but this isn't working. I followed the rules presented in that def file.

Code in ftypes.h typedef struct _a_b { int r; gint64 t; int tr; gint64 tri; }a_b;

WS_VAR_IMPORT a_b ab_struct;


Appended text in the libwireshark.def is

ab_struct DATA

Please Help!!

(07 Oct '11, 04:11) Terrestrial ...

I guess it's a linker error again about unresolved externals?

Are you sure you've rebuilt libwireshark as what you've done seems correct to me?

(07 Oct '11, 05:30) grahamb ♦

I have distcleaned and compiled it but this time there are no linker errors. Instead, I got the errors like:

ftype-integer.c

ftype-integer.c(258) : error C2037: left of 'tri' specifies undefined struct/union 'a_b'

ftype-integer.c(259) : error C2037: left of 'r' specifies undefine d struct/union 'a_b'

etc kind of Compile time errors.

(07 Oct '11, 23:30) Terrestrial ...
1

Basic c syntax errors then. This is probably better handled on the dev mailing list rather than the Q&A site. Post the relevant code and errors there. See here for more details

(08 Oct '11, 00:08) grahamb ♦

should i mail to [email protected] from my gmail account?

(08 Oct '11, 00:57) Terrestrial ...
showing 5 of 6 show 1 more comments
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:

×184

Asked: 07 Oct '11, 00:18

Seen: 1,595 times

Last updated: 08 Oct '11, 01:13

powered by OSQA