c compiling using clang
John Howie
john at thehowies.com
Tue Apr 26 17:29:56 UTC 2016
Good point, Steve!
On 4/27/16, 1:22 AM, "owner-freebsd-questions at freebsd.org on behalf of Steve O'Hara-Smith" <owner-freebsd-questions at freebsd.org on behalf of steve at sohara.org> wrote:
>On Tue, 26 Apr 2016 16:56:29 +0000
>John Howie <john at 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 at sohara.org>
>
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>https://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list