LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2008, 11:50 AM   #1
manish jain
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Rep: Reputation: 0
where comes mistakes


hi all ,
while compiling program on fedora 7 i am getting these many errors . i have no idea how to remove these errors and i cant figure out these many. can some one help me out wats going wrong and where and if i m going wrong in compiling please tell me the correct procedure to compiles the programs
[root@localhost ~]# gcc --version
gcc (GCC) 4.1.2 20070502 (Red Hat 4.1.2-12)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


[root@localhost ~]# gcc manish.cpp
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
from manish.cpp:1:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccixGW8s.o: In function `__static_initialization_and_destruction_0(int, int)':
manish.cpp.text+0x23): undefined reference to `std::ios_base::Init::Init()'
/tmp/ccixGW8s.o: In function `__tcf_0':
manish.cpp.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccixGW8s.o: In function `main':
manish.cpp.text+0x91): undefined reference to `std::cout'
manish.cpp.text+0x96): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std:perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
manish.cpp.text+0xa4): undefined reference to `std::cin'
'
manish.cpp.text+0x124): undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(unsigned int)'
/tmp/ccixGW8s.o.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
[root@localhost ~]#
 
Old 04-02-2008, 12:00 PM   #2
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
gcc is C compiler try g++
 
Old 04-03-2008, 02:58 AM   #3
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 270

Rep: Reputation: 33
u can use like this too

gcc -x c++ <filename>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lvm mistakes/manual partioniong mistakes- not using fdisk! Fred Caro Linux - Newbie 3 03-30-2008 02:05 AM
Grammar Mistakes.... Jaqui General 22 12-23-2006 01:41 PM
LXer: Mistakes in identity LXer Syndicated Linux News 0 09-15-2006 07:33 AM
tips to avoid rm mistakes statmobile Linux - Newbie 5 01-15-2004 12:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration