LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-22-2004, 06:08 PM   #1
jgoggel
LQ Newbie
 
Registered: Jul 2004
Location: Reading, UK
Distribution: Mandrake 10.0
Posts: 8

Rep: Reputation: 0
an executable that does not run


Hi there,

Just installed mandrake. Wrote a simple C program.
Compiled it with CC, gcc and others.
Executable a.out is created.
Try to run it from command line and...fails!

Any ideas?

Regards,
Jonathan
 
Old 07-22-2004, 06:09 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
try:
Code:
./a.out
The . is the current working directory and has to be part of the PATH variable for something like
Code:
a.out
to work.
 
Old 07-22-2004, 08:54 PM   #3
arvind_sv
Member
 
Registered: Oct 2002
Location: Bangalore
Distribution: Gentoo Linux
Posts: 96

Rep: Reputation: 15
If what Jim said also fails, try this:

Code:
chmod u+x ./a.out
./a.out
Maybe the executable bit is not set. I doubt that, because gcc normally takes care of that. I think Jim's solution will work.

Arvind
 
  


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
How to run executable files? Kelley Linux - Newbie 30 02-06-2011 07:47 AM
How to run an executable from browser ??? dileepkk Programming 2 08-22-2004 04:13 AM
How to run programs using executable name ravykanth Linux - Newbie 1 10-06-2003 12:45 AM
run executable files ZeRo69er Linux - Software 4 08-07-2003 03:26 AM
How do I run my executable?? scott7500 Programming 2 12-30-2001 05:22 PM


All times are GMT -5. The time now is 08:11 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration