Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Sep 17 11:44:21 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8HIiLZ8013767 for ; Wed, 17 Sep 2008 11:44:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8HIjYKF028212 for ; Wed, 17 Sep 2008 11:45:34 -0700 Message-Id: <200809171845.m8HIjYKF028212@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: csci-551 Date: Wed, 17 Sep 2008 11:45:34 -0700 From: Bill Cheng Someone wrote: > When i try to use natural log (log(x)) in my program.It gives me the > following error.I have included math.h header file > > Undefined first referenced > symbol in file > log /var/tmp//cc6RPxJT.o > ld: fatal: Symbol referencing errors. No output written to pthread > collect2: ld returned 1 exit status I think you need "-lm" when you link. -- Bill Cheng // bill.cheng@usc.edu