From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124902 invoked by alias); 8 Feb 2020 13:46:55 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 124884 invoked by uid 89); 8 Feb 2020 13:46:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=xcpp, UD:a.exe, aexe, x.cpp X-HELO: mail-wm1-f52.google.com Received: from mail-wm1-f52.google.com (HELO mail-wm1-f52.google.com) (209.85.128.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 13:46:52 +0000 Received: by mail-wm1-f52.google.com with SMTP id q9so5242917wmj.5 for ; Sat, 08 Feb 2020 05:46:52 -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; bh=Kf/tjOmZrjfevzFgJJbTmYE0vWbE+VvK+IubfW87nwc=; b=WCA+0gJoaGs2OHpd0p6GmzOZI4mjOi4Galj7vs3szPqtW17QX7wEdOfIzwpTMrHfdU iQDY0W7xCoPhqCgBGpDyEi+cG86M/PyjW0nYqqlsDGYYWgLTrrV1eGjKBj6cglZpYLQu rGgsLIT+WefwcSL1Z7ZRmXSrfgVt9309qBxsH5NMpSeT7FLqotCecOXMcydNc3Dwxd2a vQP7NvNbeb1nJqEAMqSejph6+ubOV8ha2/Vk/C4clIGVBl5mkfZUG0DA1pBT2a1et2FA JCA74gzuDHKRzi5JyxXXJn4dYKEWAkY+vuH63MuA0UD8Ddcn1dEdaV2iIuiidPg4UbJn 1R+g== MIME-Version: 1.0 References: In-Reply-To: From: Csaba Raduly Date: Sat, 08 Feb 2020 13:46:00 -0000 Message-ID: Subject: Re: Programs using std::filesystem with gcc 9.2.0 fail to run To: cygwin list Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2020-02/txt/msg00063.txt.bz2 On Sat, Feb 8, 2020 at 2:22 AM wrote: > It's possible to compile and link programs that use std::filesystem with > the g++ 9.2.0 compiler for Cygwin. For instance if I place the following > program into a file name "x.cpp": > > #include > #include > > int main() > { > std::filesystem::path p{"/tmp"}; > std::cout << p << std::endl; > } > > Then compile with: > > g++ -std=c++2a -Wall -O3 x.cpp > > It builds successfully. But running the output "a.exe" file exits > immediately with exit code 127. It does not help if I also add > "-lstdc++fs" to the build command. > Works just fine wih me: $ g++ -std=c++2a -Wall -O3 fsys.cpp $ ./a.exe "/tmp" Try running yours under gdb. You may get some more useful information about the error. Csaba -- You can get very substantial performance improvements by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler So if you're looking for a completely portable, 100% standards-conformant way to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK) -- 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