From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50927 invoked by alias); 17 Dec 2018 02:19:39 -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 50781 invoked by uid 89); 17 Dec 2018 02:19:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:692, H*r:sk:mail-ua, HX-HELO:sk:mail-ua, H*RU:sk:mail-ua X-HELO: mail-ua1-f52.google.com Received: from mail-ua1-f52.google.com (HELO mail-ua1-f52.google.com) (209.85.222.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Dec 2018 02:19:37 +0000 Received: by mail-ua1-f52.google.com with SMTP id d2so3914287ual.2 for ; Sun, 16 Dec 2018 18:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=fGnNSpUGH73faJDJJUzvumeqmNU6B5ypyNIphgo+2uE=; b=ueXZGjz+VURPxcIZP4AuacJmwTW/ltPRzG4YZFcLVgwSLNgc4C70vwJ1IdwDkn+1xB 3m8R/S+81dDMvR8K4ECy6Jc5S9TzHtFMC1yGguaMMwMr5gn/zhEdMZ6q+v5daNod2GX6 EO4X5CRrTrJd6/I31yb0a5THTni58Jzbkm123eyOOnLF3NJE56OlTT5dwzD40of2ee0N c5T9wpisRkTwS+1PjpvlKYuPRPYAYqI0J+MmNQ6unRZYQyDbDHwXpuZet4oIOj0fOjhb G3JMBBFbP60aKHI02zAretiYoRzQcilKBrR3p6tO00KZUwcWSI6SDuC3ug3hLLiKJlWw Ctgg== MIME-Version: 1.0 From: Yubin Ruan Date: Mon, 17 Dec 2018 05:06:00 -0000 Message-ID: Subject: which object file is fstat64/stat64 located To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00050.txt.bz2 Hi, 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. Note that I never use fstat64/stat64 in my program. I only use fstat/stat. >From the man page[1] it is said that on Linux fstat/stat is a wrapper around fstat64/stat64. So these two symbols must locate at some object file I don't know. [1]: http://man7.org/linux/man-pages/man2/stat.2.html -- Yubin