From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19260 invoked by alias); 27 Jun 2008 17:04:40 -0000 Received: (qmail 19224 invoked by uid 22791); 27 Jun 2008 17:04:23 -0000 X-Spam-Check-By: sourceware.org Received: from web53602.mail.re2.yahoo.com (HELO web53602.mail.re2.yahoo.com) (206.190.37.35) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 27 Jun 2008 17:04:03 +0000 Received: (qmail 19899 invoked by uid 60001); 27 Jun 2008 17:04:01 -0000 Received: from [38.105.87.6] by web53602.mail.re2.yahoo.com via HTTP; Fri, 27 Jun 2008 10:04:01 PDT X-Mailer: YahooMailRC/975.45 YahooMailWebService/0.7.199 Date: Fri, 27 Jun 2008 17:04:00 -0000 From: Harvey Muller Subject: -lm not required when including functions from math.h To: gcc-help@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <887206.19635.qm@web53602.mail.re2.yahoo.com> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00372.txt.bz2 I'm learning C programming using the GNU toolchain (gcc, as, ld, glibc) usi= ng a popular linux distribution.=A0 What I expect from what I have read so = far, is that if I use a function from the math library without specifying t= he library on the gcc, command line, is that I should get an "undefined ref= erence" error message. I am not getting the expected error message, the simple application compile= s and executes correctly.=A0 Can anyone explain why I am not getting the ex= pected error message? Best regards, Harvey