From: Stephen M. W. <ste...@cr...> - 2002-06-21 12:48:26
|
On June 21, 2002 06:16 am, Ioannis Vranos wrote: > C:\c>gcc temp2.cpp -o temp2 > C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccItbaaa.o(.eh_frame+0x11):temp2.c >pp: undefin > ed reference to `__gxx_personality_v0' > > C:\c>g++ temp2.cpp -o temp2 > > C:\c> > > > There appears to be some problem when i compile a .cpp file using > conio.h using "gcc". The gcc compiler will by default compile a .cpp file as C++. An object compiled as C++ will need the C++ runtime to support things like exceptions (as seen in your example), global constructors and destructors, free store allocation, iostreams, and so forth. If you want to build a program with C++ objects you need to either use the C++ front end 'g++' or if you use the C front end 'gcc' you will have to explicitly link in the C++ runtime, '-lstdc++'. -- Stephen M. Webb |