This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

g++ won't compile 'hello world'


Hallo cygwin,

$ g++ --version
g++ (GCC) 3.1.1 20020718 (prerelease)

$ g++ -c g++_test.C

$ g++ -o g++_test g++_test.o
g++_test.o(.text+0x39):g++_test.C: undefined reference to `std::cout'
g++_test.o(.text+0x46):g++_test.C: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
g++_test.o(.text+0x6f):g++_test.C: undefined reference to `std::ios_base::Init::Init[in-charge]()'
g++_test.o(.text+0x8a):g++_test.C: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
g++_test.o(.eh_frame+0x11):g++_test.C: undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status
  
g++_test.C:
===========
#include<iostream>
using namespace std;
int
main ()
{
  cout << "what am I doing wrong?";
  return 0;
}


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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