The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
xl C/C++ compiler to GCC compiler pbattu1 UNIX for Dummies Questions & Answers 0 02-27-2007 05:59 AM
C compiler hassan2 High Level Programming 5 10-10-2002 09:49 PM
CC compiler vtran4270 UNIX for Advanced & Expert Users 3 08-21-2002 09:58 AM
Pro*C Compiler HELP!!!!! pegasus High Level Programming 3 08-20-2002 07:44 AM
cc compiler / gcc florian.turck UNIX for Dummies Questions & Answers 2 05-21-2002 12:53 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-18-2006
Registered User
 

Join Date: Nov 2006
Posts: 17
gcc compiler

i write c++ code it run perfectely with g++ compiler but same code when i compile with
GCC compiler it gives linker error , followed these linker error

/tmp/ccfZtXOQ.o(.text+0x22): In function `main':
conf_system.cpp: undefined reference to `operator new(unsigned int)'
/tmp/ccfZtXOQ.o(.text+0x79):conf_system.cpp: undefined reference to `operator delete(void*)'
/tmp/ccfZtXOQ.o(.text+0x97): In function `__tcf_0':
conf_system.cpp: undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccfZtXOQ.o(.text+0xc4): In function `__static_initialization_and_destruction_0(int, int)':
conf_system.cpp: undefined reference to `std::ios_base::Init::Init()'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x10): In function `sys_conf::display()':
conf_system.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x15):conf_system.cpp: undefined reference to `std::cout'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x1a):conf_system.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x27):conf_system.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(long)'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x32):conf_system.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
/tmp/ccfZtXOQ.o(.gnu.linkonce.t._ZN8sys_conf7displayEv[sys_conf::display()]+0x38):conf_system.cpp: undefined reference to `std::basic_ostream<char, std::char_traits<char> >:perator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
/tmp/ccfZtXOQ.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Reply With Quote
Forum Sponsor
  #2  
Old 12-18-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
Can you show us the complete gcc command that you are passing ?
Reply With Quote
  #3  
Old 12-18-2006
Registered User
 

Join Date: Nov 2006
Posts: 17
here that command
gcc conf_system.cpp -o conf_system
Reply With Quote
  #4  
Old 12-18-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
Hmmm.. try
Code:
gcc conf_system.cpp -lstdc++ -o conf_system
Reply With Quote
  #5  
Old 12-18-2006
Registered User
 

Join Date: Nov 2006
Posts: 17
vino
it works.........
thanks a lot,
i am new unix programming i can u suggest me any book for it
Reply With Quote
  #6  
Old 12-18-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
There are a whole lot of materials on the net. To start with you can browse the FAQ section of this forum Unix Tutorials/Programming Tutorials/Shell Scripting Tutorials
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0