This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

[closed] Why gtk/gtk.h cannot be included into any header file?

0

Hello,

I have tried to include gtk/gtk.h into main_filter_toolbar.h but this is resulting in an error saying Cannot include file gtk/gtk.h. No such file or directory. How can i solve this problem?

This question is marked "community wiki".

asked 27 Oct '11, 01:02

Terrestrial%20shark's gravatar image

Terrestrial ...
96212829
accept rate: 42%

closed 30 Oct '11, 23:22

Could you compile Wireshark source before you made any changes to it?

On what operating system are you trying to compile Wireshark?

If it's a Linux distribution, what packages are installed for GTK+, and have you installed a GTK+ developer package?

(27 Oct '11, 18:51) Guy Harris ♦♦

Yes i can compile it well. Mine is Windows xp. I use CYGWIN. Actually, in our wireshark sources, there is no gtk/gtk.h file at all. But all the gtk's .c extension files can include them well. When it comes to header files, it's resulting as the above given error.

(27 Oct '11, 21:40) Terrestrial ...

The question has been closed for the following reason “Question is off-topic or not relevant” by Terrestrial shark 30 Oct ‘11, 23:22


One Answer:

1

That is correct, there is no gtk/gtk.h file in Wireshark, just as there isn't a stdio.h file in Wireshark, even though both of them are included by files in Wireshark. stdio.h is part of the C support library (comes with the OS on UN*X, comes with, I think, the MSVC compiler on Windows). gtk/gtk.h is part of the GTK+ library, and is included by several other header files in thegtk directory; I suggest that if you need to include gtk/gtk.h in main_filter_toolbar.h, you do so the same way it's done in the header files in the gtk directory that already include it.

answered 28 Oct '11, 02:21

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%