LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2004, 03:32 PM   #1
Magus_Rune
LQ Newbie
 
Registered: Jul 2004
Distribution: RedHat (Shrike)
Posts: 8

Rep: Reputation: 0
Bash File not found, What am I doing wrong?


I'm trying to run a really simple C++ program in red hat. After writing the program I compile it using the the g++ command (Literally I type "g++ program1.cpp"

If I run an ls in command line after that I can see the new file "a.out" highlighted in red.

So I try to run it by typing "a.out" and I get an error stating "bash: a.out :command not found".

Am I doing something wrong with my syntax to run this program?

Thanks for your help!
 
Old 11-28-2004, 03:34 PM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Do './a.out'

-twantrd
 
Old 11-28-2004, 03:39 PM   #3
Magus_Rune
LQ Newbie
 
Registered: Jul 2004
Distribution: RedHat (Shrike)
Posts: 8

Original Poster
Rep: Reputation: 0
thanks

thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash Programming - Where am I going wrong? [NL]_Target Programming 9 07-21-2005 08:49 PM
.kde/Autostart bash scripts "file not found" Nice-n-Slow Linux - Software 1 07-02-2004 05:25 PM
what am I doing wrong in the bash shell? alexes Linux - Newbie 4 05-18-2004 01:33 AM
Bash Shell: What went wrong. shookie Red Hat 12 05-17-2004 08:03 AM
My first BASH script, what's wrong with it? szf2 Linux - Newbie 2 11-12-2003 01:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration