Subject: Re: Beginner C Programming Questions
To: Jeff Flowers <jeffrey@jeffreyf.net>
From: Chris Wareham <chris.wareham@iosystems.co.uk>
List: netbsd-help
Date: 04/19/2002 17:57:38
Jeff Flowers wrote:
> I am starting to pursue C programming.  I will be using NetBSD 1.5.2

Fine choice of programming language and operating system!

> 
> 1. I know that NetBSD uses the GNU compiler but what about make? Does GNU's
> make (gmake?) come with the system or does NetBSD use the BSD make combined
> with GNU's compiler? (I assume that the libraries included with NetBSD is
> not the GNU C library.)
> 

NetBSD comes with BSD make, although you can add GNU make
using pkg_add. It is installed as 'gmake'.

> 2. I have just become aware of a tool called Lint, which sounds useful. Is
> Lint included with the developer tools or is that a separate package? I have
> also become aware that there is more the one Lint-style program to choose
> from. Is there any consensus on what to use?

NetBSD comes with a lint program, but *personally* I never
use it. The warning switches for the GNU compiler generally
catch most of my sillier errors. Consider including -Wall
and -Werror while developing, and -Wall for software you
distribute to others (especially for those on different Unix
variants).

> 3. I have the K&R book (ANSI/2nd edition) and it shows an example of
> compiling a program with cc. According to the book, the compiler will create
> an executable named a.out. Is this still correct or will I end up with
> something different?

cc is a link to gcc, and will work exactly the same as
described in the K&R book. If you don't specify a name for
you resulting program, then it will still be called a.out.

> Thanks. I am sure that I will be asking even more silly questions in the
> future.

If you've not already, consider subscribing to to the
comp.unix.programmer and comp.lang.c newsgroups. The former
is very good, but be that warned comp.lang.c is very high
volume and regular posters get obnoxious if questions stray
from ANSI C.

Chris
-- 
chris.wareham@iosystems.co.uk (work)
cwareham@btinternet.com (home)