|
Re: Creating Linux executable in Eclipse [message #760152 is a reply to message #760060] |
Thu, 01 December 2011 13:42 |
|
On 2011.11.30 23:49, Vernon wrote:
> Just installed Eclipse on Ubuntu Linux PC (I am very new at Linux). I
> got the Hello World (C program) to build and run fine in the little
> terminal box at the bottom right of eclipse and everything I can set is
> set to executable. How do I get the program to run without eclipse - say
> from the command line ? When I click on it it does nothing - likewise if
> I am in the appropriate executable directory and type it in the terminal.
> Thanks for helping !
First, you should ask such questions, about C/C++, in the Eclipse CDT forum.
For your case, however, it depends on whether or not your makefile
renames a.out to some better name you specify. (Eclipse CDT may do
something like this, I don't know. I have 30 years in C behind me, but
I've never used Eclipse to do it in.)
Second, you must make your linked file executable:
vernon:~/development> chmod a+x myprogram
Then, from the command line, your executable will just run as long as a)
you're in its parent subdirectory:
vernon:~/development> ./myprogram
or b) it's in one of the subdirectories in your PATH variable:
vernon:~> which myprogram
/home/vernon/development/myprogram
vernon:~> myprogram
or c) you open a Nautilus or other GUI file browser and double-click its
icon in the file system.
Based on the information you give, it's pretty hard to steer you
exactly. I hope what I'm saying here clicks somewhere with what you
already know. As I say, your best bet is to associate with "others of
your kind" in the Eclipse CDT forum. You'll get faster and better advice
from them.
Best regards,
Russ
|
|
|
Powered by
FUDForum. Page generated in 0.08504 seconds