Question About G++ Library in Cygwin

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Tue Feb 14 19:37:00 GMT 2012


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



More information about the Cygwin mailing list