X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References: <ed4892840709240936ga983f0r2ecc6dd7afb8d2d1@mail.gmail.com>
Subject: RE: what i need to compile c++/std programs?
Date: Mon, 24 Sep 2007 17:50:40 +0100
Message-ID: <000001c7fecb$0a1da680$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <ed4892840709240936ga983f0r2ecc6dd7afb8d2d1@mail.gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 24 September 2007 17:37, Steven Woody wrote:

> hi,
> 
> i am compiling a program which used std stuffs, but results in a lot
> of error messages, such as  below:
> 
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2498:
> undefined reference to `std::basic_string<cha
> r, std::char_traits<char>, std::allocator<char> >::size() const'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2507:
> undefined reference to `std::basic_string<cha
> r, std::char_traits<char>, std::allocator<char> >::operator[](unsigned
> int) const'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2509:
> undefined reference to `std::basic_string<cha
> r, std::char_traits<char>, std::allocator<char> >::operator[](unsigned
> int) const'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.tcc:2512:
> undefined reference to `std::basic_string<cha
> r, std::char_traits<char>, std::allocator<char> >::operator[](unsigned
> int) const'
> 
> i think some std library was not linked in, but i dont know how to :-(

  
  Heh, didn't we just do this one?  You need to invoke the compiler as "g++",
not "gcc", which tells it to link in the C++ support by default.

  See also the thread 'gcc does not know about "new" and "delete"' from last
Friday...

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

