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.