From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117553 invoked by alias); 19 Mar 2019 21:31:29 -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 117501 invoked by uid 89); 19 Mar 2019 21:31:29 -0000 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 Received: from mail-lf1-f42.google.com (HELO mail-lf1-f42.google.com) (209.85.167.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 19 Mar 2019 21:31:27 +0000 Received: by mail-lf1-f42.google.com with SMTP id v14so297149lfi.0 for ; Tue, 19 Mar 2019 14:31:27 -0700 (PDT) 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@gmail.com> Date: Tue, 19 Mar 2019 21:31:00 -0000 Message-ID: Subject: Problems with "Hello, World!" To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00497.txt.bz2 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