LinuxQuestions.org
Visit Jeremy's Blog.
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 07-22-2004, 05: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, 05:09 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
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, 07:54 PM   #3
arvind_sv
Member
 
Registered: Oct 2002
Location: Bangalore
Distribution: Gentoo Linux
Posts: 96

Rep: Reputation: 16
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



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

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

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