X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; q=dns; s=default; b=Lgm2WXP3D5pX4qi7 vIfveV9Fb8ydEwWXIJ9S5zqxnrcVlCE5l3/4EUoRMWIaq/ecYlLoyXuPTBxEorQQ Lz0B4X9MNOcjtOU2qLIhFefabcyznPUzBTwxA1tS1IOKpVw7r9M4nkJS8PHrHjzz nP8TLNVOIbbtMqsopBCLKMVgAyg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; s=default; bh=q6dH769+4qpHDnNOctrAAo F26sE=; b=MQbapZD/HgshSVWqHONoubBVx05L1YlpGDi9+PY3BHFmlHN3bZjk4E w/E7ywdmFx52YgCqTaBEteW3fh4LNdfap9P54PE6bsEGa+V4urafegDY/JKMX1Ft mbkP5Ln8VftqIYiLJVYU7etiIuJD9sY02f1jF4/84wKEXAXLqUZuw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=spamemail, SpamEmail, MyBig, mybig X-HELO: mail-wm0-f52.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-transfer-encoding; bh=4Nbi4iVqeI5V1oY3P4duAR3tMKvl6to85MzmYIC6ClM=; b=b0TT+KPNtNXIRBiL/3x+XgtPZGO6gpi61sR8g6I5pclw7ear/U+sRTI1AZIsUDqjj/ W5wJNsTf9bh8n5a30G0UK/yEuEB3e4O+HynIQ+8GERa5L7ColVmNx96FgHI/AV6tBv8W O/HxkP/WhziBC4iUIr5rC1TcY/tnglFQWXqtDBkNw6nBB4jBTFPBPK4fvXUhP5fSxsfv puxn78ZJdciGtjNXBPJZhpNQDbn8mSzDi4EHEQQJFd6rbLr9+0SKUBihUqwRkWkhHMF1 p7kyVaZVYYHuykEKdLCvqhBx/bjuCnnqfs/xHHw2TDYA064uLIhIeXpiRkeLSnTbJbmh FfhA== X-Gm-Message-State: AD7BkJIKjp3A9Vsn6WW3EM62iCSuolCPa/WTmA1YAeMEEwZm9+U9DJQUlnXlrzJaMoo/wkXnumDwUZHeZ5u1eA== MIME-Version: 1.0 X-Received: by 10.194.76.72 with SMTP id i8mr24403414wjw.117.1456908929539; Wed, 02 Mar 2016 00:55:29 -0800 (PST) In-Reply-To: References: Date: Wed, 2 Mar 2016 09:55:29 +0100 Message-ID: Subject: Re: realpath() function not declared in scope when "-std=c++11" option added to g++ From: Csaba Raduly To: cygwin list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u228tkpw008335 Hi MyBig, On Wed, Mar 2, 2016 at 7:58 AM, MyBig SpamEmail wrote: > > Compiling the following code in test.cpp: > > #include > #include > > int main ( void ) > { > realpath ( "//.", NULL ); > return 0; > } > > This works: > % g++ test.cpp > > This doesn't: > % g++ -std=c++11 test.cpp > test.cpp: In function ‘int main()’: > test.cpp:8:25: error: ‘realpath’ was not declared in this scope > realpath ( "//.", NULL ); > ^ I don't have a Cygwin machine at hand, but try compiling with -std=gnu++11 instead of -std=c++11. realpath() might be hidden if __STRICT_ANSI__ is defined (when you use -std=c++11, IIRC). Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple