[S.u.S.E. Linux] gcc compiling under 5.1
when I try to run a file such as "hello world" using gcc I compile using: "gcc -o hello hello.c" "chmod 777 hello" permissions now read "rwxrwxrwx hello" when I try to run "hello" I get the message "hello command not found" I have just done a full install of 5.1 on an intel 133mhz machine. How do I get the file to run? -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
<PRE> try ./hello it's possible the current working directory is NOT in your path. In unix/Linux, you have to specify the current directory explicitly for it to be includeded. On 31-May-98 denis miller wrote:
permissions now read "rwxrwxrwx hello" when I try to run "hello" I get the message "hello command not found"
---------------------------------- <A HREF="http://benham.net/index.html"><A HREF="http://benham.net/index.html</A">http://benham.net/index.html</A</A>> -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d+(-) s:+ a29 C++$ UL++>++++ P+++$ L++>++++ E? W+++$ N+(-) o? K- w+++$(--) O M-- V- PS-- PE++ Y++ PGP++ t+ 5 X R+ !tv b++++ DI+++ D++ G++>G+++ e h+ r* y+ ------END GEEK CODE BLOCK------ ---------------------------------- </PRE> <A HREF="pgp00005.pgp"> PGP signature</A></P>
Thanks, however where and when do I type ./hello. I am feeling pretty lost in this right now. The help is appreciated! Darren Benham wrote:
try ./hello it's possible the current working directory is NOT in your path. In unix/Linux, you have to specify the current directory explicitly for it to be includeded.
On 31-May-98 denis miller wrote:
permissions now read "rwxrwxrwx hello" when I try to run "hello" I get the message "hello command not found"
---------------------------------- <A HREF="http://benham.net/index.html"><A HREF="http://benham.net/index.html</A">http://benham.net/index.html</A</A>> -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d+(-) s:+ a29 C++$ UL++>++++ P+++$ L++>++++ E? W+++$ N+(-) o? K- w+++$(--) O M-- V- PS-- PE++ Y++ PGP++ t+ 5 X R+ !tv b++++ DI+++ D++ G++>G+++ e h+ r* y+ ------END GEEK CODE BLOCK------ ----------------------------------
------------------------------------------------------------------------
Part 1.2 Type: application/pgp-signature
-- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
<PRE> On 31-May-98 denis miller wrote:
Thanks, however where and when do I type ./hello. I am feeling pretty lost in this right now. The help is appreciated!
Darren Benham wrote:
try ./hello it's possible the current working directory is NOT in your path. In unix/Linux, you have to specify the current directory explicitly for it to be includeded.
On 31-May-98 denis miller wrote:
permissions now read "rwxrwxrwx hello" when I try to run "hello"
You try to run "./hello" and not "hello"... do it at this point of your test.
I get the message "hello command not found"
---------------------------------- <A HREF="http://benham.net/index.html"><A HREF="http://benham.net/index.html</A">http://benham.net/index.html</A</A>> -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d+(-) s:+ a29 C++$ UL++>++++ P+++$ L++>++++ E? W+++$ N+(-) o? K- w+++$(--) O M-- V- PS-- PE++ Y++ PGP++ t+ 5 X R+ !tv b++++ DI+++ D++ G++>G+++ e h+ r* y+ ------END GEEK CODE BLOCK------ ---------------------------------- </PRE> <A HREF="pgp00006.pgp"> PGP signature</A></P>
You can also add . to your path statement in your shell startup script file. ( this may be .profile .tcshrc .cshrc depending on which shell you are running ) Just make sure that it is the last entry in the path list. Laszlo On Sun, 31 May 1998, denis miller wrote:
Thanks, however where and when do I type ./hello. I am feeling pretty lost in this right now. The help is appreciated!
Darren Benham wrote:
try ./hello it's possible the current working directory is NOT in your path. In unix/Linux, you have to specify the current directory explicitly for it to be includeded.
On 31-May-98 denis miller wrote:
permissions now read "rwxrwxrwx hello" when I try to run "hello" I get the message "hello command not found"
---------------------------------- <A HREF="http://benham.net/index.html"><A HREF="http://benham.net/index.html</A">http://benham.net/index.html</A</A>> -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d+(-) s:+ a29 C++$ UL++>++++ P+++$ L++>++++ E? W+++$ N+(-) o? K- w+++$(--) O M-- V- PS-- PE++ Y++ PGP++ t+ 5 X R+ !tv b++++ DI+++ D++ G++>G+++ e h+ r* y+ ------END GEEK CODE BLOCK------ ----------------------------------
------------------------------------------------------------------------
Part 1.2 Type: application/pgp-signature
-- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
-- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
denis miller <scurran@aracnet.net> wrote:
. How do I get the file to run?
Hmmm have you tried ./hello ? -Dee W.D.McKinney (Dee) -=- deem@wdm.com No claim to fame, just saved by Grace. -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
Usually a path problem: if your current directory is not on your path, try "./hello" -- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (5)
-
deem@wdm.com
-
gecko@benham.net
-
johnsonburke@toward.com
-
laszlo@idt.net
-
scurran@aracnet.net