-x option for gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 [I am literally a novice.Kindly bear with me]

 I wrote a c++ program (test.cc) which runs well with g++.
 Now I tried to compile with with gcc now :

 gcc -x c++ test.cc
  
 Now the compiler shouts at me saying there are some undefined references.
 (The list is truly long compared to the source program).

------------------------------------------------------------------
 For instance :

 [root@linux3 root]# gcc -x c++ test.cc
/tmp/ccjD2gLW.o(.text+0xc8): In function `main':
: undefined reference to `std::cout'
/tmp/ccjD2gLW.o(.text+0xcd): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> 
>& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&, char const*)'

 --------------------------------------------------------------------


 Surely I am missing something.Can somebody help me as a start?
 
 (my version is gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20)) 

  Thanks in advance.

-- 
Regards,
Anitha B,



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux