Hi, I got the mail.OK.But -lstdc++ is not helpful. It gives : undefined reference to main error. On Fri, 20 Oct 2006, Surya Santosh Kumar Allena wrote: > Hi Anitha, > -lstdc++ must be given while compiling C++ code with gcc. > Refer to this link: > http://gcc.gnu.org/ml/gcc-help/2000-04/msg00101.html > This might be helpful. > Regards > Surya Santosh > > Hi Brian, > > > > On Fri, 20 Oct 2006, Brian Dessent wrote: > > > Anitha Boyapati wrote: > > > > > [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). > > > > The real question is why you would want to do this. Supplying "-x c++" > > > The reason is simple.Am fascinated by this option at first glance. > > > > does not have the same effect as invoking g++, which knows all the > > necessary libraries and options to pass on to the subprocesses. All -x > > does is set the type of language by which the file will be interpreted, > > but there is more to it. You will run into all kinds of problems by not > > invoking the g++ driver for C++ code. > > > Ok.That seems like I need to give a deeper dig to get this option work. > > > > > > > > Brian > > > > > -- > Regards, > Anitha B, > Sankhya Technologies Private Limited. > -- Regards, Anitha B, Sankhya Technologies Private Limited.