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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SpIGKyzrzR0jmpl3 CzRASrmHolMtKUEh1QV1kXGDo3TONb/L9bpOKjz6DrBBPUuvMngyqduYsqHFTn7w kq3hfXCr8BriPaKBLtLmpUUonah/E6haWr0ZYoz0zLvRD5xACyNfHwqluh0EghE2 Lt5w+dw19Od38ZskfjFzLNroc8Y= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=B64Tb+b+N5NJfF4t5V2DNj or9WM=; b=EX3OxPJ9aYL8RW+wXjOGcEUqsUGcCTLww0tKYqInjen74IBw6nGQrl g3JIs+Yecsa9Miz7LeXhy7qbTvey++mDq3fwfH8IXVquNUL+tTw5MWTXbM21BGlv 1fd9coO9GG/phJsnmTAEo6FlioncTYna7cLo4hvnFAeZYdHuxoHbM= 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=-6.1 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1220 X-HELO: mout.kundenserver.de Subject: Re: Problems with "Hello, World!" To: cygwin AT cygwin DOT com References: From: Thomas Wolff Message-ID: Date: Tue, 19 Mar 2019 23:14:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Am 19.03.2019 um 22:31 schrieb Vesa P.: > 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. What does `type gcc` tell you? -- 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