gcc help
Fred Butler
Fred.Butler@as-design.com
Sat Mar 16 17:44:00 GMT 2002
Hi,
I am running Solaris 8 and I hace gcc-3.0.3 and binutils-2.11.2 installed.
I am trying to compile a simple program:
#include<iostream.h>
main()
{
int a,b,c;
cout << "Enter two integers:\n";
cin >> a,b;
c = a + b;
cout << "This is the answer to the two numbers: " << c << '\n';
return 0;
}
When I do so I get the following list of errors. I am not sure where to go
from
Here. Can someone lend me a hand?
Regards,
Fred Butler
/var/tmp/cceOlpTG.o: In function `main':
/var/tmp/cceOlpTG.o(.text+0x1ac): undefined reference to `std::cout'
/var/tmp/cceOlpTG.o(.text+0x1b0): undefined reference to `std::cout'
/var/tmp/cceOlpTG.o(.text+0x1c4): undefined reference to `std::cin'
/var/tmp/cceOlpTG.o(.text+0x1c8): undefined reference to `std::cin'
/var/tmp/cceOlpTG.o(.text+0x1e8): undefined reference to `std::cout'
/var/tmp/cceOlpTG.o(.text+0x1ec): undefined reference to `std::cout'
/var/tmp/cceOlpTG.o: In function
`__static_initialization_and_destruction_0(int,
int)':
/var/tmp/cceOlpTG.o(.text+0x260): undefined reference to
`std::ios_base::Init::I
nit()'
/var/tmp/cceOlpTG.o(.text+0x31c): undefined reference to
`std::ios_base::Init::~
Init()'
/var/tmp/cceOlpTG.o: In function `std::basic_ostream<char,
std::char_traits<char
> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char,
std::cha
r_traits<char> >&, char const*)':
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x154): undefined reference to `__cxa_begin_catch'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x1c0): undefined reference to `__cxa_rethrow'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x1d0): undefined reference to `__cxa_end_catch'
@
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x1c0): undefined reference to `__cxa_rethrow'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x1d0): undefined reference to `__cxa_end_catch'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_PKc+0x1e4): undefined reference to `__cxa_end_catch'
/var/tmp/cceOlpTG.o: In function `std::istream::operator>>(int&)':
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZNSirsERi+0x160): undefined reference
to `_
_cxa_begin_catch'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZNSirsERi+0x1cc): undefined reference
to `_
_cxa_rethrow'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZNSirsERi+0x1dc): undefined reference
to `_
_cxa_end_catch'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZNSirsERi+0x1f4): undefined reference
to `_
_cxa_end_catch'
/var/tmp/cceOlpTG.o: In function `std::basic_ostream<char,
std::char_traits<char
> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char,
std::cha
r_traits<char> >&, char)':
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_c+0x158): undefined reference to `__cxa_begin_catch'
/var/tmp/cceOlpTG.o(.gnu.linkonce.t._ZStlsISt11char_traitsIcEERSt13basic_ost
ream
IcT_ES5_c+0x1c4): undefined reference to `__cxa_rethrow'
@
More information about the Gcc-help
mailing list