Total members 11892 |It is currently Sat Sep 21, 2024 9:37 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





The problem that i couldn't know if the mistake from the code or from the compiler?
i have been setup cygwin.........as starting to learn Linux and into it
as a start to learn c++
i want to compile a (hello world) code
==================
#include<iostream.h>
void main()
{
cout<<"helloworld";

}
===================
but when i try to compile it with g++

i received the following message :-
=+=+==+=+==+=+==+=+==+=+==+=+==+=+==+=+==+=+=
=+=+==+=+==+=+=+==+=+==+=+==+=+==+==+=+==+=+=
$ gcc hello_world.cpp

In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/iostream.h:31,

from hello_world.cpp:1:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: warning: #w
arning This file includes at least one deprecated or antiquated header. Please consider usi
ng one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include su
bstituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of t
he deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32
collect2: ld returned 1 exit status
=+=+==+=+==+=+==+=+==+=+==+=+==+=+==+=+=
=+=+==+=+==+=+==+=+==+=+==+=+==+=+==+=+=
so please see it quickly and reply me here
or more faster by e-mail

[email protected]

----------------------------------------------------------
and thanks for your accurate .





Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time

Hi TarekSliem,

the solution is contained in this part:

TarekSliem wrote:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2: warning: #w
arning This file includes at least one deprecated or antiquated header. Please consider usi
ng one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include su
bstituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of t
he deprecated header <iostream.h>


Just use

Code:
#include<iostream>


The headers with .h are old style and should not been used anymore.


Author:
Newbie
User avatar Posts: 4
Have thanks: 1 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : eror compile c++ code in cygwin
 i want code for connecting mobile and pc can u send me code     -  
 Freeman chain code algorithm code     -  
 asking for code     -  
 code     -  
 Get IP address code     -  
 XML Paging Code     -  
 Code of stack     -  
 need code for my website     -  
 US Zip Code Validation     -  
 error in code     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com