mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Add resource section to Windows executable


From: Gerardo Ballabio
Subject: [Mingw-cross-env-list] Add resource section to Windows executable
Date: Mon, 29 May 2017 12:05:23 +0200

Hello,
I'm using MXE to cross-compile a program based on the GTK+ 3 library. I found that when I run the compiled program, it doesn't display the standard icons. It seems that the icon set must be installed separately on the target system. It was NOT so with GTK+ 2, the icons were embedded in the binary and it "just worked". I asked for help on the GTK+ mailing list and got this answer:

"Windows PE executables have a nice feature where there's a resource
section which is by convention used for strings and also graphics like
the program's icons. This is common and natural on Windows, so if you
can load the file dynamically at runtime and set icons explicitly,
then provided your cross compiler is able to include the needed PE
section, you can build a self-contained file which is one .exe with
all the needed code and data/resources. This feature of PE files
is as old as Windows itself and will work, if that's a concern of
yours, if you can generate the desired .exe and can convince
GTK+ to load stuff at runtime manually."

Does MXE support that?

Thanks
Gerardo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]