From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21951 invoked by alias); 28 Jun 2002 09:05:03 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21933 invoked from network); 28 Jun 2002 09:05:00 -0000 Received: from unknown (HELO anchor-post-35.mail.demon.net) (194.217.242.85) by sources.redhat.com with SMTP; 28 Jun 2002 09:05:00 -0000 Received: from mailgate.softwire.co.uk ([62.49.203.138] helo=polarbear) by anchor-post-35.mail.demon.net with esmtp (Exim 3.36 #2) id 17NrgZ-0001d0-0U; Fri, 28 Jun 2002 10:04:59 +0100 From: "Rupert Wood" To: "'Long Li'" Cc: Subject: RE: g++ -lmalloc error Date: Fri, 28 Jun 2002 02:05:00 -0000 Message-ID: <616BE6A276E3714788D2AC35C40CD18D5EC4B5@whale.softwire.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D6BF9FC@whale.softwire.co.uk> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-06/txt/msg00244.txt.bz2 Long Li wrote: > g++ -Wall -g -lpthread -lrt -lmalloc -I{$my_file_path} : > /usr/bin/ld: can not find -lmalloc > collect2: ld returned 1 exit status The problem is that you're asking ld to link against libmalloc.a or libmalloc.so but it can't find either of these. Do you have a libmalloc.a or .so? If so, make sure that ld is searching the path it's in (you can add paths using '-L'). Do you really need libmalloc? The function is probably available in the C library unless you've got special requirements. Check your OS C library documentation. Rup.