![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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> >: /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> >: /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> >: /tmp/ccfZtXOQ.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Can you show us the complete gcc command that you are passing ?
|
|
#3
|
|||
|
|||
|
here that command
gcc conf_system.cpp -o conf_system |
|
#4
|
||||
|
||||
|
Hmmm.. try
Code:
gcc conf_system.cpp -lstdc++ -o conf_system |
|
#5
|
|||
|
|||
|
vino
it works......... thanks a lot, i am new unix programming i can u suggest me any book for it |
|
#6
|
||||
|
||||
|
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
|
||||
| Google The UNIX and Linux Forums |