I'm compiling a c application with gcc that uses gtk3
I use the gtk_window_set_icon() to set icon, and it shows on the window and the taskbar.
I want to know how can I compile my application so that the file .exe itself has the same icon. (i.e. when I open up the folder where the .exe is located I would see the icon on the .exe file, before even launching the program)
any idea ?
(Note, I am running this on windows 7 64bit)
In fact GTK has nothing to do with. GTK is a library for graphical user interface. But here what you want is to manage your exectuable file.
Since you're on Windows, this is achived by using a resource file. For an icon you can have something like this (name it resource.rc for example):
1 ICON test.ico
Then with the gcc suite, you can use windres to compile this:
windres resource.rc resource.o
And now compile and link all together:
gcc test.c resource.o
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With