Wireshark-dev: [Wireshark-dev] how to include a head file
From: "??????????" <[email protected]>
Date: Fri, 28 Mar 2014 13:10:09 +0800
I create a head file in wireshark,name peformance.h:
#include <glib.h>

typedef struct peformance_s
{
gfloat time[100];
      gfloat delay[100];
guint32 packetSize[100];
guint32 payload;
guint32 index;
guint32 temp_size;
gfloat temp_time;
}peformance;
extern peformance* peformance_test;

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

peformance pef_test;
peformance *peformance_test=&pef_test;

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?