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:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=ElIIYnZ hgMp+J6WqmA5GpDZ6rrRhNARQI6dd/VpP88Wvsd4yZJfXBJy+EN16JIjQmRHBxAF B4t+VfVD5+sPUCODSp/oRyiHyvILsCxio7zPw1rUNA09bottpkxrA4BEL8e67teh RJE9NbHmwI8Cm45xA/v4Mu3RHkpzBazquBDA= 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:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=44D18wu70xUmd 9T2lZd+oY+57fA=; b=owm1aoQWgELPJEv4gUPfV9PDaDFfisBBTFJRWFL2d0FQj OFsaiekQaTaEw8sYJEYXUhdqdaTK7Cp50JEu24pOEso8OooFGONXTOfcTpKYsQvO IqSw5WxSBwiZJRSOhLwXqQ/BbMVgY/MEiSom+oqL20sL0CmE0Nx0namZItNWO0= 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-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 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, 8 Feb 2020 14:46:34 +0100 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" 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