tags:

views:

132

answers:

4

Hi, I wanna know how to create executable application in linux just like .exe file in windows. most of you have used/seen "Pidgin IM" in linux on click of that it will open the window where you can see your buddies and more similar to gnome-caculator. i want to create the same executable file for my application.

thank you adavnce.

+1  A: 

It sounds like you are looking for a framework such as Qt or WxWidgets. Both these frameworks allow you to create windowed GUI applications for Linux (and Windows and Mac OS X).

Greg Hewgill
Those are GUIs. He's looking for something like .deb
lyrae
+4  A: 

The most common way to create executables is to use a compiler. (Just like on windows.) The GNU Compiler Collection (GCC) may already be installed on your Linux system, see if you can find it with:

$ which gcc

or

$ gcc --help

If not, you'll have to install it. It has man pages (man gcc), info pages (info gcc), and an online manual.

Note the gcc command itself is the C compiler part, there's g++ for C++ and others for other languages (though you have considerable control through command line options).

Roger Pate
+1  A: 

Hm, a few steps:

You first have to write your program. You could write it in C, C++, Python, Java, or anything. If you want the program to have a GUI, rather than just being command-line based, then you have to write code that paints windows, buttons, etc.

After doing that, you'll have an executable. In Linux, in contrast to Windows, executable files don't have a ".exe" suffix. Were you to open a terminal, you could just type in "pidgin" and the program would run.

Finally, to create the desktop/menu shortuct, that is specific to the GUI environment. In gnome, you can right-click on the desktop, select "Create Launcher", and follow the menu to select the executable file you have created - similarly to what you do in Windows.

Not sure if this is what you were asking about, but I hope that is helpful!

rascher
A: 

A lot of it depends on which language you are using to write the program, if you are using a scripting language like bash, python of php you need to make sure the first line of the script tells what interpreter to use:

#! /usr/bin/env python

This tells the machine to look for the python executable to interpret the rest of the script. You can do the same thing with:

#! /usr/bin/env php

or

#! /usr/bin/env bash

the other thing you need to remember is to change the permissions to make the script/program executable:

chmod 755 myscript.py
jrglasgow