From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81804 invoked by alias); 18 Dec 2018 02:33:10 -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 80986 invoked by uid 89); 18 Dec 2018 02:33:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-vk1-f173.google.com Received: from mail-vk1-f173.google.com (HELO mail-vk1-f173.google.com) (209.85.221.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 02:33:07 +0000 Received: by mail-vk1-f173.google.com with SMTP id b18so3348279vke.2 for ; Mon, 17 Dec 2018 18:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VDdLZtJLjNRPhlJdh4HVvQ9O5cDb+tkWWJaPZ/3CGYk=; b=vM5J18tTpZH7tx+yAOaX+tsKdn3koE1Y6DUISEuP7WLNsG25HiI0rgCEq9a7Lk6ORK YEg+E8JZbNGkK1GGNM+Q/AdrOrVlWGIid0qWefBr8fvj9Mp0V8kA90zi2AAviWwX4HrB 9Ud1BZ109fs24RyNsKZp99kY+gk1bm5QGhyAAs+5EXb2qvEgedWIgbdo67GbOdSPrhCZ 7Y7aNcYZ571UnU0YFASG2Ha4/uQ7M1ogUMaEAy8MVzfhtAWvmwy1dLNlTDxyuTVIWLKX ze/vgNLBNMMiDoHEvRi3obZ9UO1EhfyXQmg9R5o9LRwXGVgvKFQw2v7res8IduSTU5/N pcog== MIME-Version: 1.0 References: <871s6gcrsy.fsf@oldenburg2.str.redhat.com> In-Reply-To: <871s6gcrsy.fsf@oldenburg2.str.redhat.com> From: Yubin Ruan Date: Tue, 18 Dec 2018 06:42:00 -0000 Message-ID: Subject: Re: which object file is fstat64/stat64 located To: Florian Weimer Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00058.txt.bz2 On Mon, Dec 17, 2018 at 7:32 PM Florian Weimer wrote: > > * 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? My target is a C++ program(mysqld) which use fstat/stat and other C++ standard library functions. Normally libstdc++ is used and everything is fine. But I want to switch to libcxx. -- Yubin