views:

98

answers:

2

I made a program to connect to a device via Bluetooth and send the data to the web using pure C in gcc. I won't be able to implement any GUI portion in the code right now but I need to deploy it to test users for testing. I want to have the executable with an icon so that a user can click on the executable and the program starts in the terminal. How do I add an icon to the executable and start the program in the terminal?

Sorry I failed to mention before that its in Ubuntu Linux

A: 

If this is a Windows executable you're making, what you need to do is to use a resource compiler to make an object file that includes the resources you want (an icon in this case) which you can then link into your program as normal. The resource compiler I've used when building programs on Windows with gcc was called windres.

I found it to be very finicky when dealing with directories with spaces in the name. Beware!

Donal Fellows
A: 

This document explains how to add your program to the programs menu: http://standards.freedesktop.org/menu-spec/latest/.

Bastien Léonard