Re: C Program compile error

2002-02-22 Thread Ben Logan
On Fri, Feb 22, 2002 at 07:16:12AM -0700, Frank Carreiro wrote: > Is there a list someone can suggest I join? Looking for one that can > help answer these kind of questions :-) Somewhere out there there's a list called linux-c-programming...I think it's one of the mailing lists pointed to on ke

Re: C Program compile error

2002-02-22 Thread Frank Carreiro
> > > >A bit more explanation--although this isn't specifically RedHat, or even >Linux, so it should be on a software development list...so the following >is necessarily simplified. But it should dispell some misconceptions I >think I see. > Is there a list someone can suggest I join? Looking f

Re: C Program compile error

2002-02-21 Thread Statux
# gcc -o program code.c -lm Make sure you're remembering to include the library at compile time. The math functions are not part of the standard C library :) On Thu, 21 Feb 2002, Frank Carreiro wrote: > Not sure if this is the right list for it but here goes... > > I'm currently learning how

Re: C Program compile error

2002-02-21 Thread Dave Ihnat
On Thu, Feb 21, 2002 at 02:57:58PM -0500, Trond Eivind Glomsrød wrote: > No, it only declares the symbols and functions. A header file does not > specify linking. > > > Out of curiosity is there a way to compile without specifying -lm? > > > > Just wondering why -lm is required for standard math

C Program compile error

2002-02-21 Thread Frank Carreiro
Not sure if this is the right list for it but here goes... I'm currently learning how to code in C. I'm using a RedHat 7.1 workstation which when installed I selected to install everything (I don't like messing with dependancies ::grinz::). I've been including stdio.h and the last few weeks

Re: C Program compile error

2002-02-21 Thread Trond Eivind Glomsrød
Frank Carreiro <[EMAIL PROTECTED]> writes: > That worked thanks :-) > > I've read through the gcc man page and didn't see the -lm option. In > my source as I understand it #include should have done it. No, it only declares the symbols and functions. A header file does not specify linking. >

Re: C Program compile error

2002-02-21 Thread Frank Carreiro
That worked thanks :-) I've read through the gcc man page and didn't see the -lm option. In my source as I understand it #include should have done it. Out of curiosity is there a way to compile without specifying -lm? Just wondering why -lm is required for standard math functions. Thanks

Re: C Program compile error

2002-02-21 Thread Trond Eivind Glomsrød
Frank Carreiro <[EMAIL PROTECTED]> writes: > Not sure if this is the right list for it but here goes... > > I'm currently learning how to code in C. I'm using a RedHat 7.1 > workstation which when installed I selected to install everything (I > don't like messing with dependancies ::grinz::).

Re: C Program compile error

2002-02-21 Thread Jim Hayward
On Thu, 21 Feb 2002 11:17:40 -0700 Frank Carreiro <[EMAIL PROTECTED]> wrote: > I try and compile. Getting the following message: > > --- > > In function `main`: > undefined reference to `pow` > collect2: ld returned 1 exit status > > --- > > I'm trying to calculate a value (x) raised to the