Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Reply-To: Cygwin List Message-Id: <6.2.0.14.0.20050107125034.050e3660@pop.prospeed.net> Date: Fri, 07 Jan 2005 12:59:00 -0500 To: "Emerson" , cygwin AT cygwin DOT com From: Larry Hall Subject: Re: newbie question about using gcc in cygwin In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 02:42 AM 1/7/2005, you wrote: >Hi all: > I want to know how to compile a program in cygwin using gcc. > Here is my instance: > 1>I install cygwin in c:/cygwin > 2>I wrote a piece of code named test.c in E:/prog/test/test.c. > AND suppose the program just printf "hello". > > How can i compile and link my code using gcc ? Should i give >the absolute path of my program (E:/prog/test/test.c.) when using gcc? > And another problem is where the "hello " is printf? Is it in >the windows console or "cygwin console"(i don't know whether it is >appropriate name )? > Thank you for your patience. These are actually more generally questions about how to use 'gcc', which you should be able to get from documentation about 'gcc'. I'd suggest . Since these are really general 'gcc' questions, they are really off-topic. However, the question about where the output will occur may be a grey area. ;-) The "console" in Windows is generally the window in which you can type commands. The most well-known program of this kind is the "DOS box", called cmd.exe on NT-based platforms and command.com on 9x-based platforms. The Cygwin shells, bash, ash/sh, tcsh, zsh, etc run in a "DOS box". But Cygwin programs can run in a "DOS box" regardless of whether you're running a Cygwin shell. So the output of "printf" goes to, by default, the "DOS box" that you're running the program from. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/