When i compile something on a windows pc with lets say dev-c++ or code::blocks, i always get a simple .exe file which can be opened with a simple double click. On linux (i am using ubuntu) when i compile something with code::blocks i get a file without an extention, but the icon shows that the program is executable. When you double click it, nothing happens. When you give it permissions (allow executing this file as a program) it still doesn't do anything. if you add a command for opening it with Autorun Prompt (which was a wild guess 'cause i thought it would work) it also doesn't do anything, so what the hell? How can i make an executable file in linux that works with a simple double click?
If you open a terminal and run /yourpath/yourexecutablefile it should run
( If you are already in the directory of the executable file run it like this: ./yourexecutablefile
Is it a console program? If so, do you expect a terminal to appear? Because that won't happen if you run an executable from a file browser. It will run, but all output will usually be written to the .xsession-errors file.
However, you can create a shell script that runs e.g. gnome-terminal with your program as a parameter. Or just start it from a terminal, which is what you should've done in the first place.
It "works". If you run it from the file browser, the program will run. If it is a GUI program and creates a window, you'll see the window. If it doesn't, you won't.
If you care about the output or if it expects input, you run it from the terminal.
It's as simple as that.