From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2968 invoked by alias); 14 Nov 2013 12:07:09 -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 2958 invoked by uid 89); 14 Nov 2013 12:07:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-la0-f41.google.com Received: from Unknown (HELO mail-la0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 14 Nov 2013 12:07:08 +0000 Received: by mail-la0-f41.google.com with SMTP id hp15so1499948lab.0 for ; Thu, 14 Nov 2013 04:06:58 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.170.66 with SMTP id ak2mr147985lbc.60.1384430818536; Thu, 14 Nov 2013 04:06:58 -0800 (PST) Received: by 10.112.173.195 with HTTP; Thu, 14 Nov 2013 04:06:58 -0800 (PST) In-Reply-To: <41302A7145AC054FA7A96CFD03835A0A0B7AB76F@EX10MBX02.EU.NEC.COM> References: <41302A7145AC054FA7A96CFD03835A0A0B7AB76F@EX10MBX02.EU.NEC.COM> Date: Thu, 14 Nov 2013 12:07:00 -0000 Message-ID: Subject: =?windows-1252?Q?Re=3A_How_to_fix_=22=91get=5Fcurrent=5Fdir=5Fname=92_was_not_d?= =?windows-1252?Q?eclared_in_this_scope=22_=3F?= From: Jonathan Wakely To: David Aldrich Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00091.txt.bz2 On 14 November 2013 11:57, David Aldrich wrote: > Hi > > Our application builds fine on Ubuntu 12.04 LTS, using gcc 4.6.3. > > However, when I attempt to build on Fedora 19, which uses gcc 4.8.2 I see: > > g++ -I../../Kernel -Wall -m64 -O3 -c -o FileSystem.o FileSystem.cpp > FileSystem.cpp: In static member function =91static std::string FileSyste= m::currentDir()=92: > FileSystem.cpp:108:34: error: =91get_current_dir_name=92 was not declared= in this scope > p =3D get_current_dir_name(); > > Please will someone explain how to fix this? Declare the function, of course! It's declared in so make sure you include that. If you use that function without including then your code was always broken, but you got away with it in the past. See the header dependency changes section of http://gcc.gnu.org/gcc-4.7/porting_to.html for more details.