> Frank Eory schrieb: > > Is the .RES supposed to be the > > input to the resource compiler with a .O as an output? > > No, you must use the msys ressource-compiler "Winres" (you get it on > MinGW-Site) to create the .a-file. To set the apps icon, you > must do the > following steps:
I think the OP was actually asking about using the MS tools, so windres is probably not what he'd use. > 1. Create the ressource "Icon.res" (or use any name you like ;o) The fltk example follows the convention of calling this file *.rc, I think. > 2. Compile the static lib "windres Icon.res libicon.a". It > is important > to use the prefix "lib" for the name, but to include it as "icon". > > 3. Link the library to your project This process seems to be a bit over-complicated. In particular, the output from windres need not be a named as a library (libxyz.a) as it is simply an object file like any other, and really ought to be named as xyz.o. > 4. Load the icon from within the app, using common windows-style: > > #define IDI_MAIN 111 // Icon-Ressource > char* pIcon= (char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_MAIN)); The resource value (IDI_MAIN here, although I usually prefer IDI_ICON myself) should never be defined in the source code - it should come from the resource header file that is included by both the source code and your resource file. It is imperative that the value assigned to the resource is the same in both the source code and the resource file, and the safest way to do this is to define it in a shared header file. For this purpose the fltk example uses the file "sudokurc.h" SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

