New guy to the yellowdog-general mailing list (with two questions)

Mike Parson yellowdog-general@lists.terrasoftsolutions.com
Sat Feb 28 21:27:01 2004


On Sat, Feb 28, 2004 at 06:36:55AM -0800, Steve Milov wrote:
> Thanks for the help.
> 
> I had been using:
> gcc file.c
> 
> When I should have been using
> 
> gcc -lm file.c
> 
> I didnt know I had to use the switch on the command
> line.  I thought just using #include <math.h> was
> sufficient.

The #include tells the source code and compiler where to find the
interfaces in the associated library (libm/ -lm).

The only library gcc will 'automatically' link against is libc, all
others need to be called specifically.

Next, learn how to manage that C compile project with make and a Makefile.

=)

-- 
Michael Parson
mparson@bl.org