About GCC: how can this problem be solved ?? -- Linux general technology-Linux programming and kernel information. The following is a detailed description. OS: Ubuntu7.04
My GCC can only compile C, not C ++;
Both g ++ can be compiled;
Can Both GCC be compiled ??
Error message:
/*************************************** ************************/
Chenyunchao @ ubuntu :~ /C $ gcc test. cpp
/Tmp/ccSiYEqo. o: In function '_ static_initialization_and_destruction_0 (int, int )':
Test. cpp :(. text + 0x23): undefined reference to 'std: ios_base: Init ()'
/Tmp/ccSiYEqo. o: In function '_ tcf_0 ':
Test. cpp :(. text + 0x6c): undefined reference to 'std: ios_base: Init ::~ Init ()'
/Tmp/ccSiYEqo. o: In function 'main ':
Test. cpp :(. text + 0x8e): undefined reference to 'std: cout'
Test. cpp :(. text + 0x93): undefined reference to 'std: basic_ostream > & Std: operator < > (Std: basic_ostream > &, Char const *)'
Test. cpp :(. text + 0x9b): undefined reference to 'std: basic_ostream > & Std: endl > (Std: basic_ostream > &)'
Test. cpp :(. text + 0xa3): undefined reference to 'std: basic_ostream >:: Operator <(std: basic_ostream > & (*) (Std: basic_ostream > &))'
/Tmp/ccSiYEqo. o :(. eh_frame + 0x11): undefined reference to '_ gxx_personality_v0'
Collect2: ld returns 1
/*************************************** **************************/
What's going on ??
Thank you !!!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service