* GCC compiled program not runable?
@ 1998-09-23 4:00 hfon
1998-09-23 4:00 ` Joseph Sarkes
0 siblings, 1 reply; 3+ messages in thread
From: hfon @ 1998-09-23 4:00 UTC (permalink / raw)
Hi, all:
Please help me with the following problem:
Running RedHat 5.1 Linux for Alpha on an Alpha 200-4/233, I have installed
all necessary tools. When I write even a very simple C program, gcc can
compile it to an executable file. But when I run that executable program,
the system tells me that the file is not found.
For example, I wrote a program called p1.c, and I use "gcc -Wall p1.c -o p1"
to compile it to a prgram called p1. In order to convince myself, I even "ls
-l" the directory, yes, p1 is there, and I have the right to execute it. But
when I typr p1 hit enter, it says "p1: command not found".
This is mad. Neither can I run it by an absolute path name nor "./p1". So
what's wrong?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GCC compiled program not runable?
1998-09-23 4:00 GCC compiled program not runable? hfon
@ 1998-09-23 4:00 ` Joseph Sarkes
1998-09-23 4:00 ` Matt Grossman
0 siblings, 1 reply; 3+ messages in thread
From: Joseph Sarkes @ 1998-09-23 4:00 UTC (permalink / raw)
hfon@my-dejanews.com wrote:
: Running RedHat 5.1 Linux for Alpha on an Alpha 200-4/233, I have installed
: all necessary tools. When I write even a very simple C program, gcc can
: compile it to an executable file. But when I run that executable program,
: the system tells me that the file is not found.
Likely you are missing a shared library somehow.
The program is there, but since the shared libraries are
part of the program, and can't be found, you get the file
not found error. I forget now how I fixed that when I saw
it.
--
Joseph Sarkes mailto:joe@mediaone.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GCC compiled program not runable?
1998-09-23 4:00 ` Joseph Sarkes
@ 1998-09-23 4:00 ` Matt Grossman
0 siblings, 0 replies; 3+ messages in thread
From: Matt Grossman @ 1998-09-23 4:00 UTC (permalink / raw)
joe@js.ne.mediaone.net (Joseph Sarkes) writes:
> hfon@my-dejanews.com wrote:
>
> : Running RedHat 5.1 Linux for Alpha on an Alpha 200-4/233, I have installed
> : all necessary tools. When I write even a very simple C program, gcc can
> : compile it to an executable file. But when I run that executable program,
> : the system tells me that the file is not found.
>
And he did try ./program, too!
> Likely you are missing a shared library somehow.
> The program is there, but since the shared libraries are
> part of the program, and can't be found, you get the file
> not found error. I forget now how I fixed that when I saw
> it.
You can run ldd on your executable to find out what shared libraries
it is trying to link with.
You can then set the $LD_LIBRARY_PATH environment variable to tell ld
where to look for libraries (ie export
LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"), if this turns out to
be your problem.
Matt Grossman
mattg@oz.net
http://www.oz.net/~mattg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-09-23 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-23 4:00 GCC compiled program not runable? hfon
1998-09-23 4:00 ` Joseph Sarkes
1998-09-23 4:00 ` Matt Grossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox