delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.3 required=5.0 tests=BAYES_00,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <25189372.post@talk.nabble.com> |
Date: | Fri, 28 Aug 2009 05:51:36 -0700 (PDT) |
From: | ken j <kjacks2006us AT yahoo DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Cannot get 'Hello World' to compile |
In-Reply-To: | <f60fe000908280531j433aa646s7a26de5c0154c54e@mail.gmail.com> |
MIME-Version: | 1.0 |
References: | <25188895 DOT post AT talk DOT nabble DOT com> <f60fe000908280531j433aa646s7a26de5c0154c54e AT mail DOT gmail DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
That was it - using g++ as the compiler and changing the file name to .cpp The executable file was placed in my cygwin/home/username folder. Do I have to specify that folder in the set path variable for Cygwin to see it? I'm not entirely clear on this issue. I really appreciate the help! Ken Mark J. Reed wrote: > > You named your program with a .c and ran gcc on it. Both of those mean > C, which is a different language from C++. A C++ compiler will > compile a C program, but not the other way around. > > Rename your file to end in .cc, .c++, .cpp, or .cxx, your choice (or > capital .C if you have case sensitivity turned on), and run "g++" > instead of "gcc". > > > -- > Mark J. Reed <markjreed AT gmail DOT com> > > -- > 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 > > > -- View this message in context: http://www.nabble.com/Cannot-get-%27Hello-World%27-to-compile-tp25188895p25189372.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |