TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Neil Heller
from: Winston Smith
date: 2003-05-22 07:09:06
subject: Linux and GCC

-> I just created hello_world.out with gcc.  From the command line I typ
-> hello_world and hello_world.out and got the same reply both times:
-> No
-> such function.  How does one normally launch an executable applicatio
-> from the command line in *nix?

Think 'PDF'.  Not a print document, but PATH-DIRECTORY-FILE.

First off, is the directory where the command resides present in your
search path?  If not, then the OS will not look for it.  Often, the
current working directory, known as "dot", is removed from the path as a
security precaution.  If this is the case, then you would call your
executible by its path, such as /dir0/dir1/hello_world or ./hello_world.

Second is the directory.  Does the directory within which your file
reside allow for executibles to be run?  Back up a directory level with
"cd .." dotdot and do a "long list" on the directory
"ls -ld dir1" and
make sure the 'x' execute permission flag is turned on.

Third is the file itself.  Nothing in UNIX is executible until you "tell
the OS" that it is executible.  You do this with the CHMOD
"change mode"
of file command.  Do an "ls -l hello_world.out" and see if the execute
permission flag is set.  UNIX uses permission flags rather than ".COM"
and ".EXE" extenders.  The Octal flags for Owner, Group, and World, need
to have their One's Bit set.  A "CHMOD 755 hello_world.out" or a
"CHMOD
+x hello_world.out" should do it.

Lastly, a fourth option occurs if you are using EMX in a non-OS/2
environment.  In this case you will need to "prepend" the EMX Run-Loader
to the front of the file executible by running the 'BIND' command first
in order to bind the EMX loader onto the front of the GCC A.OUT runtime
object machine code (as far as I know, this is only necessary under
MS-DOS).

--- ViaMAIL!/WC v1.60d
* Origin: Chowdanet (401-331-0615) telnet://chowdanet.com (1:323/120)
SEEN-BY: 633/267 270
@PATH: 323/120 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.