LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-20-2004, 01:46 AM   #1
legend1079
Member
 
Registered: Mar 2004
Location: Pakistan
Posts: 49

Rep: Reputation: 15
Unhappy how to run C++ compiled program


please if there is some one that can tell
me the way to run the compiled c or c++ program
from console
when i enter name of compiled program
it is said as
Bash: unknown command
help me please
 
Old 03-20-2004, 02:06 AM   #2
tvn
Member
 
Registered: Mar 2004
Posts: 96

Rep: Reputation: 15
g++ filename.cc -o filename
./filename or enter the full path of the compiled file such as /home/you/where_you_compiled_it_to/filename


You can find the answer to this question easily using google or linux documents project.
 
Old 03-20-2004, 07:40 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,265

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
BTW
./ means current working directory. Unlike windows BASH does not search the current working directory before searching the path for a command.

To view path environment:
echo $PATH
 
  


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
what is a.out means...when we compiled C program indian Programming 8 09-17-2004 02:32 AM
how to run compiled C file. cdmn Linux - Newbie 2 09-05-2004 08:24 AM
error: cannot run C compiled programs. terry.trent Linux - Newbie 6 08-06-2004 12:07 AM
why ./ is used to run C++ compiled programs legend1079 Red Hat 4 03-23-2004 07:32 AM
cannot run C compiled programs Astro Slackware 7 01-27-2004 11:32 PM


All times are GMT -5. The time now is 07:04 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