Wireshark mailing list archives
how to include a head file
From: "??????????" <237825552 () qq com>
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?
___________________________________________________________________________ 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:
- how to include a head file ?????????? (Mar 27)
- Re: how to include a head file Peter Wu (Mar 28)