delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/14/14:37:23

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=3.6 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
MIME-version: 1.0
Message-id: <4F3AB7CB.4050700@cygwin.com>
Date: Tue, 14 Feb 2012 14:36:43 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-to: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
To: cygwin AT cygwin DOT com
Subject: Re: Question About G++ Library in Cygwin
References: <CAKbRB+PFx=vjirsCtsW49y6c45w-bz_RuDYEja4BOvA_4h3hDw AT mail DOT gmail DOT com>
In-reply-to: <CAKbRB+PFx=vjirsCtsW49y6c45w-bz_RuDYEja4BOvA_4h3hDw@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

On 2/14/2012 2:24 PM, Jia Wu wrote:
> Hi,
> I just installed the latest version of Cygwin, selecting Devel,
> Database and Interpreter packages. When I try to compile a very simple
> Hello.cpp, I got some problems.
>
> Hello.cpp code:
> #include<iostream>
>
> int main()
> {
>          std::cout<<  "Hello, World!"<<  std::endl;
> }
>
> Error report:
> $ gcc hello.cpp
> In file included from
> /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/postypes.h:42:0,
>                   from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/iosfwd:42,
>                   from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ios:39,
>                   from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ostream:40,
>                   from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/iostream:40,
>                   from hello.cpp:2:
> /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/cwchar:145:11: error:
> ‘::fgetws’ has not been declared
> /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/cwchar:147:11: error:
> ‘::fputws’ has not been declared
...

> Please tell me what is problem and how should I figure it out! Many thanks!!

You're using the wrong front-end.  Use g++.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019