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

Wireshark-dev: [Wireshark-dev] Problem in using a global variable in wireshark/gtk folder which

From: Vishnu Bhatt <vishnu.bhatt@xxxxxxxxxxx>
Date: Wed, 18 Apr 2012 16:22:07 +0530

Hello,

I have a global variable in a .c file in the wireshark/epan/dissectors/ folder. How do I use it in another .c file in the wireshark/gtk/ folder? Every time I try using extern, I get an "undefined reference" error. I am able to use the same variable in another .c file in the epan/ folder. Is there anything I am missing?

 

The exact error I am getting is

 

/home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.c:139: undefined reference to `UE_trace_IMSI_table'

 

“UE_trace_IMSI_table” is a global variable defined in /home1/vishnu.bhatt/11.2.1/wireshark_3g/epan/dissectors/packet-abc.c

 

And I am trying to use “UE_trace_IMSI_table” in /home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.c

 

I have declared “UE_trace_IMSI_table” in /home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.h

 

Any help will be appreciated.

 

Thanks and Regards

Vishnu Bhatt





===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================