LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2003, 04:09 AM   #1
J0nathan
Member
 
Registered: Jul 2003
Location: Australia
Distribution: FreeBSD6
Posts: 41

Rep: Reputation: 15
problem with g++


I've been trying to get g++ to work - i type:
g++ guess_number.cpp
where guess_number.cpp is the name of my source file. This works correctly, and a file called a.out is created. The probem is, i cannot run a.out. I tried typing a.out in the konsole, but it just said:
-bash: a.out: command not found
I even tried double clicking on the file, but nothing happens. How do i run it??
 
Old 12-18-2003, 04:14 AM   #2
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
You need to type
./a.out

The current directory is not part of the path that is searched for commands to run.

Regards
Martin
 
Old 12-18-2003, 04:23 AM   #3
J0nathan
Member
 
Registered: Jul 2003
Location: Australia
Distribution: FreeBSD6
Posts: 41

Original Poster
Rep: Reputation: 15
Oh, thanks a lot!
Wonder why my book doesn't say that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM


All times are GMT -5. The time now is 10:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration