From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88677 invoked by alias); 17 Dec 2018 11:32:18 -0000 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 Received: (qmail 87888 invoked by uid 89); 17 Dec 2018 11:32:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Dec 2018 11:32:17 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D092680F7C; Mon, 17 Dec 2018 11:32:15 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-85.ams2.redhat.com [10.36.116.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04C821000049; Mon, 17 Dec 2018 11:32:14 +0000 (UTC) From: Florian Weimer To: Yubin Ruan Cc: gcc-help@gcc.gnu.org Subject: Re: which object file is fstat64/stat64 located References: Date: Mon, 17 Dec 2018 20:51:00 -0000 In-Reply-To: (Yubin Ruan's message of "Mon, 17 Dec 2018 10:19:24 +0800") Message-ID: <871s6gcrsy.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00056.txt.bz2 * Yubin Ruan: > I am seeking help here since I got error of "undefined reference to > fstat64/stat64" when linking without libstdc++ in a C++ program. I was > trying to use libcxx, so I added -nodefaultlibs when compiling the > program. To get necessary symbols from libc, I added -lc (and also > -lm -lgcc_s -lgcc). But I still got the undefined reference error. What's your target? Thanks, Florian