Wireshark mailing list archives

Re: how to include a head file


From: Peter Wu <lekensteyn () gmail com>
Date: Fri, 28 Mar 2014 09:28:22 +0100

On Friday 28 March 2014 13:10:09 我想不无聊 wrote:
then I add the file to /gtk/main.c file ,
#include "peformance.h" //somebody told me not to use "../peformance.h" because there is subdir to search

Well, I was that "somebody" and refused to reply on the last private mail
because you provided *no* additional details that was requested.


peformance pef_test;
peformance *peformance_test=&pef_test;

Please fix this typo, it is performance. PeRformance.

in the ./wiretap/libpcap.c file, I want to use struct peformance ,
#include "peformance.h"  //or #include "../peformance.h",i do not know which one to use

peformance_test->index=0;

it shows to me one error,the error information is :

"   wiretap/.libs/libwiretap.so: undefined reference to `peformance_test'  "

what is going on and why is that?

libwiretap is not linked with the ui, but wireshark is. If you need
your symbol in libwiretap, then define performance_test in libwiretap.
libwiretap gets linked with wireshark, so this should work fine.

Kind regards,
Peter

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: