Subject: g++ won't compile 'hello world'
From: "Gerrit P. Haase" <[email-masked]>
To: [email-masked]
Date: Wed, 21 Aug 2002 16:07:43 +0200

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/