delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/11/14:54:16

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <COL119-W329491962DDBD4F070AF75B0E70@phx.gbl>
From: Gery Herbozo Jimenez <gamejihou AT hotmail DOT com>
To: <cygwin-xfree AT cygwin DOT com>, <cygwin AT cygwin DOT com>
Subject: C++ script doesn't work using g++
Date: Fri, 11 Sep 2009 18:54:03 +0000
MIME-Version: 1.0
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


I have a simple script:

#include
#include
int main()
{
clrscr();
cout<<"Hallo";
getch();
}

However it doesn't work under this command:

g++ hallo.cpp -o hallo.exe

It gives:

In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backwar=
d/iostream.h:31,
from hallo.cpp:1:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:3=
2:2: warning: #warning This file includes at least one deprecated or antiqu=
ated header. Please
consider using one of the 32 headers found in section 17.4.1.2 of the C++ s=
tandard. Examples include substituting the header for the header for C++ in=
cludes, or
instead of the deprecated header . To disable this warning use -Wno-depreca=
ted.
hallo.cpp:2:19: conio.h: No such file or directory
hallo.cpp: In function `int main()':
hallo.cpp:6: error: `clrscr' undeclared (first use this function)
hallo.cpp:6: error: (Each undeclared identifier is reported only once for e=
ach function it appears in.)
hallo.cpp:8: error: `getch' undeclared (first use this function)

Someone knows why? I tested it under borland c++ (v.5) in windows and works=
 perfectly.

Any hint is grateful.

Gery
_________________________________________________________________
Hay tantos ordenadores como personas. =A1Descubre ahora cu=E1l eres t=FA!
http://www.quepceres.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

- Raw text -


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