Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2016 18:22:18 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: c compiling using clang
Message-ID:  <20160426182218.96e1c8534b9df45f5bcdb709@sohara.org>
In-Reply-To: <822D1209-D65C-4F45-A287-A81A7E31EBE1@thehowies.com>
References:  <CADNZooNCtC5D4KfoL0S94vj=v%2BgqzLXsh_Ruj%2B-h0ZvpyboW%2BQ@mail.gmail.com> <822D1209-D65C-4F45-A287-A81A7E31EBE1@thehowies.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Apr 2016 16:56:29 +0000
John Howie <john@thehowies.com> wrote:

> Hi Arnab,
> 
> The ‘%’ is the UNIX (FreeBSD) prompt, shown in examples in text books. Do
> not type it in. Depending on your shell, and whether or not you are
> running as root, you might have $ or # as your prompt instead, or even
> something fancier depending on how your profile is setup.
> 
> Just type “cc filename.c” (not the quotes, they are there to highlight
> what to type). This will produce a file called a.out. You run that by
> typing “a.out” (again, do not type the quotes). If you want to compile
> your program to a named file you would type “cc -o myfile filename.c”,
> and to run the program just type “myfile”.

	Just one nit "./a.out" and "./myfile" the current directory is not
usually in the path searched for executables.

-- 
Steve O'Hara-Smith <steve@sohara.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160426182218.96e1c8534b9df45f5bcdb709>