Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 14:42

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Changing your program's icon in gcc/mingw
PostPosted: 25 Jun 2009 20:19 

Joined: 16 Aug 2007 06:25
Posts: 367
The info below probably obvious to most of you programmers, but I am starting to learn C (and trying to get away from the Visual Basic crap) and just figured out how to change my console application's icon with mingw/gcc so I figured I would share:

1) Create a file with a single line on it like so: 1 ICON myicon.ico
2) Save the file as myicon.rc
3) Navigate to your mingw bin folder via the command line (like C:\MinGW\bin) and run the tool "windres.exe" like so: windres myicon.rc myicon.o
4) This will create a new myicon.o file that you can use with gcc during your compile.
5) Add "myicon.o" to your compile like so: gcc -o helloworld.exe helloworld.c myicon.o

Enjoy! Your application now has a cool icon of your choice. Better than the boring default 8).

Credits to fragglet for a more detailed article.


Top
 Profile  
 
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: