This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygwin gcc 3.0.4 problem



Win2000 Cygwin 1.3.10-1 binutils 2.11.2

Hi. I've just built  3.0.4 native on Cygwin. Build seemed to
go fine and I can compile/run C prog hello.c

However  C++ hello.cpp  fails as shown below. Is this something
trivial I am missing?

Thanks for any help

Pete

$ cat hello.cpp
#include <iostream.h>

int main ()
{
   cout << "Hello World!";
   return 0;
}



$ gcc -v hello.cpp
Reading specs from /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/specs
Configured with: gccSource/gcc-3.0.4/configure --enable-threads=win32 
--enable-l
anguages=c,c++
Thread model: win32
gcc version 3.0.4
  /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/cc1plus.exe -v -D__GNUC__=3 
-D__GNU
C_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -D_X86_=1 -D_X86_=1 -Asystem=winnt 
-D__NO_IN
LINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__
-D__tune_i686__ -D__tune_pentiumpro__ 
-D__stdcall=__attribute__((__stdcall__)) -
D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) 
-D_c
decl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) 
-D__i386__ -D
__i386 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem 
/usr/loca
l/include -idirafter /usr/local/i686-pc-cygwin/include -idirafter 
/usr/include -
idirafter /usr/local/i686-pc-cygwin/include/w32api -idirafter 
/usr/include/w32ap
i hello.cpp -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS 
-D__GXX_ABI_VERSION=1
00 -quiet -dumpbase hello.cpp -version -o /tmp/ccEJ7efr.s
ignoring nonexistent directory "/usr/local/i686-pc-cygwin/include"
ignoring nonexistent directory "/usr/local/i686-pc-cygwin/include/w32api"
GNU CPP version 3.0.4 (cpplib) (80386, BSD syntax)
GNU C++ version 3.0.4 (i686-pc-cygwin)
         compiled by GNU C version 3.0.4.
ignoring nonexistent directory "NONE/include"
#include "..." search starts here:
#include <...> search starts here:
  /usr/local/include
  /usr/local/include/g++-v3
  /usr/local/include/g++-v3/i686-pc-cygwin
  /usr/local/include/g++-v3/backward
  /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/include
  /usr/include
  /usr/include/w32api
End of search list.
  as --traditional-format -o /tmp/ccsfB8Tw.o /tmp/ccEJ7efr.s
  /usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4/collect2.exe 
-L/usr/local/i686-pc-c
ygwin/lib/w32api/ -L/usr/lib/w32api/ -Bdynamic --dll-search-prefix=cyg 
/usr/lib/
crt0.o -L/usr/local/lib/gcc-lib/i686-pc-cygwin/3.0.4 -L/usr/lib/mingw 
/tmp/ccsfB
8Tw.o -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc
/tmp/ccsfB8Tw.o(.text+0x36):hello.cpp: undefined reference to `std::cout'
/tmp/ccsfB8Tw.o(.text+0xce):hello.cpp: undefined reference to 
`std::ios_base::In
it::Init()'
/tmp/ccsfB8Tw.o(.text+0x12c):hello.cpp: undefined reference to 
`std::ios_base::I
nit::~Init()'
/tmp/ccsfB8Tw.o(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x
c):hello.cpp: undefined reference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x
157):hello.cpp: undefined reference to `__cxa_begin_catch'
/tmp/ccsfB8Tw.o(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x
1b3):hello.cpp: undefined reference to `__cxa_rethrow'
/tmp/ccsfB8Tw.o(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x
1e3):hello.cpp: undefined reference to `__cxa_end_catch'
/tmp/ccsfB8Tw.o(.text$_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x
1f1):hello.cpp: undefined reference to `__cxa_end_catch'
/tmp/ccsfB8Tw.o(.text$_ZNSo6sentryD1Ev+0x3b):hello.cpp: undefined reference 
to `
std::uncaught_exception()'
/tmp/ccsfB8Tw.o(.text$_ZNSo5writeEPKci+0xc):hello.cpp: undefined reference 
to `_
_gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSo5flushEv+0xc):hello.cpp: undefined reference to 
`__gx
x_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0xf):hello.cpp
: undefined reference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0x45):hello.cp
p: undefined reference to `std::ios_base::xalloc()'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0x88):hello.cp
p: undefined reference to `operator new(unsigned)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0xa4):hello.cp
p: undefined reference to `std::_Format_cache<char>::_Format_cache()'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0xd3):hello.cp
p: undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0xff):hello.cp
p: undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE6_S_getERSt8ios_base+0x11f):hello.c
pp: undefined reference to `std::ios_base::register_callback(void 
(*)(std::ios_b
ase::event, std::ios_base&, int), int)'
/tmp/ccsfB8Tw.o(.text$_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostat
e+0x6c):hello.cpp: undefined reference to `std::__throw_ios_failure(char 
const*)
'
/tmp/ccsfB8Tw.o(.text$_ZNSt8auto_ptrISt13_Format_cacheIcEED1Ev+0x29):hello.cpp:
undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0xc):hello.cpp: undefined reference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0xb3):hello.cpp: undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0xdb):hello.cpp: undefined reference to `operator new(unsigned)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0xf7):hello.cpp: undefined reference to 
`std::_Format_cache<char>::_Format_c
ache()'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0x144):hello.cpp: undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0x160):hello.cpp: undefined reference to `operator delete(void*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0x177):hello.cpp: undefined reference to `__cxa_begin_catch'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0x186):hello.cpp: undefined reference to `__cxa_end_catch'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_S_callbackENSt8ios_base5eventERS
1_i+0x1c6):hello.cpp: undefined reference to `__cxa_call_unexpected'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_M_populateERSt8ios_base+0xf):hel
lo.cpp: undefined reference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_M_populateERSt8ios_base+0x291):h
ello.cpp: undefined reference to `std::locale::~locale()'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcE11_M_populateERSt8ios_base+0x2bb):h
ello.cpp: undefined reference to `std::locale::~locale()'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcED1Ev+0xc):hello.cpp: undefined 
refe
rence to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt13_Format_cacheIcED1Ev+0xa6):hello.cpp: 
undefined ref
erence to `__cxa_call_unexpected'
/tmp/ccsfB8Tw.o(.text$_ZSt9use_facetISt8numpunctIcEERKT_RKSt6locale+0x51):hello.
cpp: undefined reference to `std::__throw_bad_cast()'
/tmp/ccsfB8Tw.o(.text$_ZNSsD1Ev+0xc):hello.cpp: undefined reference to 
`__gxx_pe
rsonality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs6assignERKSs+0xf):hello.cpp: undefined reference 
to `
__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep10_M_destroyERKSaIcE+0xc):hello.cpp: 
undefined r
eference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep10_M_destroyERKSaIcE+0xdf):hello.cpp: undefined
reference to `__cxa_call_unexpected'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep8_M_cloneERKSaIcEj+0xc):hello.cpp: 
undefined ref
erence to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep8_M_cloneERKSaIcEj+0xa7):hello.cpp: 
undefined re
ference to `__cxa_begin_catch'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep8_M_cloneERKSaIcEj+0xc7):hello.cpp: 
undefined re
ference to `__cxa_rethrow'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep8_M_cloneERKSaIcEj+0xed):hello.cpp: 
undefined re
ference to `__cxa_end_catch'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep10_M_refcopyEv+0xc):hello.cpp: undefined 
referen
ce to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep10_M_refcopyEv+0x95):hello.cpp: undefined 
refere
nce to `__cxa_call_unexpected'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep9_S_createEjRKSaIcE+0xc):hello.cpp: 
undefined re
ference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSs4_Rep9_S_createEjRKSaIcE+0x53):hello.cpp: 
undefined r
eference to `std::__throw_length_error(char const*)'
/tmp/ccsfB8Tw.o(.text$_ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0xc):
hello.cpp: undefined reference to `__gxx_personality_sj0'
/tmp/ccsfB8Tw.o(.text$_ZNSt23__malloc_alloc_templateILi0EE13_S_oom_mallocEj+0x1f
):hello.cpp: undefined reference to `std::__throw_bad_alloc()'
/tmp/ccsfB8Tw.o(.data$_ZTISt9exception+0x0):hello.cpp: undefined reference 
to `v
table for __cxxabiv1::__class_type_info'
/tmp/ccsfB8Tw.o(.text$_ZNKSt8ios_base6getlocEv+0x16):hello.cpp: undefined 
refere
nce to `std::locale::locale(std::locale const&)'
/tmp/ccsfB8Tw.o(.text$_ZNSt8ios_base5pwordEi+0x3a):hello.cpp: undefined 
referenc
e to `std::ios_base::_M_grow_words(int)'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x18):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_mutex_init()'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x1d):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_once'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x44):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_mutex'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x60):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_mutex_address'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x68):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_mutex_address_init()'
/tmp/ccsfB8Tw.o(.text$_ZNSt15_STL_mutex_lock13_M_initializeEv+0x9d):hello.cpp: 
u
ndefined reference to `std::_GLIBCPP_mutex'
collect2: ld returned 1 exit status


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]