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:from:date:message-id:subject:to :content-type; q=dns; s=default; b=KKEFtSmmicy/ix4O1jjztSgopxInz XbNctJrX2+L2pmaE8QSdcT6UnIIWOe5TgLc3fFyddJXB388VXTHsrsjjx1CwTqea tb86L2Ce0Vh2P0QrYnjuwf96AxrIWzH5DTwZQ1hgWvDwa/6MwSwCYCZTEG9M0OyE 4W7XOS50yZSxYs= 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:from:date:message-id:subject:to :content-type; s=default; bh=vlgH+SZoq5xIej5+QELCdh83k0w=; b=DJ6 bIpq0pm98ekUu4YZilVnibGgpsMGeIg+1mZYZmzNPm7kTg4nJif3rKSCqDqkLAGh CnlEtV3Sr4m5u859bj6xKRU3RpRpFmacM4otdo9bBon4O4NVcGwrax8BP5KIaaYu VjADj9UBr3deC7mXjCuOo11JwxUBqw6pSD9S+cEc= 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=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_STARTS_WITH_NUMS,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Enterprise X-HELO: mail-lf1-f42.google.com 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=JwuSuG4ZhqJ7cpfrm26wNt5zEKotMWyjvpbt/Wi03zE=; b=UwOAPRTiXhq/xJO9bzy88ficzGnQ4h64aiLg9OTurRkb1e7jd9myPdX9q07p+nrwmT kIDmxTE5vdt0HK0cc5AAO2v0vnB17ljjEjzIAl2CbA7za0XB2bNZBMizMT/OzTywbHwH mvl3cRQk9xGbfxW4KhCLV6QdFQ8CKU1hATG1lJWIDZkZQGBMULQnh8QTUuGTdP8hvmSG h23OTCCgMHT0B1LDLUSxcxkuU3AVkK3oT6TSAlNO22pHy9CptXYWsUYdZsho7YgbBq75 QQOxWYOafoeeMXY6k4U2GQBEt15z5tMmTJr0BnJUJIRJh0OvTy+fQzS8LDKYCvmDp9k/ cErQ== MIME-Version: 1.0 From: "Vesa P." <938v14p33 AT gmail DOT com> Date: Tue, 19 Mar 2019 23:31:12 +0200 Message-ID: Subject: Problems with "Hello, World!" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Hi all, Cygwin works great for me in providing POSIX tools for Windows, but when I tried to to compile something of my own, I immediately ran into problems. Compiling my Hello World application didn't complain but when running it I didn't get any output. My compilation command was like this: gcc -Wextra -Wall -o hello hello.c And my source code is below between "---" markers: ---------------------------------- #include int main() { printf("Hello, World!\n"); return 0; } ---------------------------------- I also tried by redirecting output, like "./hello > output.txt" but that created only an empty file, proving that my write permissions were sufficient, I suppose. Then I thought that maybe the problem is in connecting to stdout and I tried by direct file access: --------------------------------- #include int main() { FILE *of = fopen("./outfile.txt", "w"); if(of) { fprintf(of, "Hello, World!\n"); fclose(of); } return 0; } --------------------------------- However, that didn't create the "outfile.txt" file. I did those experiments in a Windows 10 environment, I think it is Windows 10 Enterprise. I have installed Cygwin without administrator privileges, in 2018. A practical work-around has been to use MinGW for compilation. Thanks for any help, Vesa -- 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