TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PETERXPERCIVAL@HOTMAIL.CO
from: JAN PANTELTJE
date: 2018-07-05 16:14:00
subject: Re: a.out problem

On a sunny day (Thu, 5 Jul 2018 16:11:22 +0100) it happened Peter Percival
 wrote in :

>Alister wrote:
>> On Thu, 05 Jul 2018 15:43:27 +0100, Peter Percival wrote:
>>
>>> Jan Panteltje wrote:
>>>> On a sunny day (Thu, 5 Jul 2018 14:22:06 +0100) it happened Peter
>>>> Percival  wrote in
>>>> :
>>>>
>>>>> I wrote a "Hello world" program in C.
>>>>>
>>>>> gcc hello.c
>>>>>
>>>>> creates a.out without warnings or error messages.  ls shows that a.out
>>>>> exists.
>>>>>
>>>>> a.out
>>>>>
>>>>> gets the response
>>>>>
>>>>> -bash: a.out: command not found
>>>>
>>>> Try ./aout
>>>>
>>>> For compile, better use gcc -Wall -o hello hello.c
>>>>
>>>> ./hello
>>>>
>>>>
>>> Thank you.  I have added . to PATH and it now works.
>> please reconsider that approach carefully, it opens up a bunch of
>> potential security risks
>>
>
>I am new to all this!  What are they?  Is there an appropriate directory
>in which I can put my executables, and whose name I may safely add to PATH?

/usr/local/bin

and for scripts I use
/usr/local/sbin/



The other thing you may look into is writing a simpe Makefile,
put all you dependencies there,
define 'make install'

then you can simple type
make
make instal
...
make install man
make clean
...
make coffee


And then later we talk about configure, configure.ac, and Makefile.am etc
and then later about automatically creating makefiles for X with
xmkmf


;-)

Best is to look at the many open source packages to see how it is done.
read some ..... manuals

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

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™.