public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: pcarlini@unitus.it
To: gcc-gnats@gcc.gnu.org
Subject: other/9274: [pch] Big troubles with v3
Date: Sat, 11 Jan 2003 15:26:00 -0000	[thread overview]
Message-ID: <20030111151823.6150.qmail@sources.redhat.com> (raw)


>Number:         9274
>Category:       other
>Synopsis:       [pch] Big troubles with v3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 11 07:26:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Paolo Carlini
>Release:        g++ (GCC) 3.4 20030111 (experimental)
>Organization:
>Environment:
i686-pc-linux-gnu, glibc2.3.1, binutils2.13.2.1
>Description:
Consider:
<header.h>
#include <iostream>
#include <string>

<test1.cc>
#include "header.h"

int main()
{
  std::cout << "Hello World!" << std::endl;
}

<test2.cc>
#include "header.h"

int main()
{
  std::string str = "Hello World!";
  std::cout << str << '\n';
}

After a 'g++ -x c++-header header.h', I get:

-test1.cc
/tmp/ccM9ZCnR.o: In function `main':
/tmp/ccM9ZCnR.o(.text+0x30): undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))'
collect2: ld returned 1 exit status

-test2.cc
/usr/local/gcc-exp/include/c++/3.4/bits/stl_algobase.h:149: warning: inline
   function `const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = size_t]'
   used but never defined
/usr/local/gcc-exp/include/c++/3.4/cmath:391: warning: inline function `_Tp
   std::__pow_helper(_Tp, int) [with _Tp = double]' used but never defined
/usr/local/gcc-exp/include/c++/3.4/cmath:391: warning: inline function `_Tp
   std::__pow_helper(_Tp, int) [with _Tp = float]' used but never defined
/usr/local/gcc-exp/include/c++/3.4/cmath:391: warning: inline function `_Tp
   std::__pow_helper(_Tp, int) [with _Tp = long double]' used but never defined
/tmp/cc2tQmQg.o: In function `main':
/tmp/cc2tQmQg.o(.text+0x18): undefined reference to `std::allocator<char>::allocator[in-charge]()'
/tmp/cc2tQmQg.o(.text+0x32): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string[in-charge](char const*, std::allocator<char> const&)'
/tmp/cc2tQmQg.o(.text+0x45): undefined reference to `std::allocator<char>::~allocator [in-charge]()'
/tmp/cc2tQmQg.o(.text+0x5e): undefined reference to `std::allocator<char>::~allocator [in-charge]()'
/tmp/cc2tQmQg.o(.text+0x71): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc2tQmQg.o(.text+0x94): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string [in-charge]()'
/tmp/cc2tQmQg.o(.text+0xad): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string [in-charge]()'
collect2: ld returned 1 exit status
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2003-01-11 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11 15:26 pcarlini [this message]
2003-01-28  3:46 bkoz
2003-01-28 20:56 Geoff Keating
2003-01-29 12:56 Paolo Carlini
2003-01-29 18:16 Benjamin Kosnik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030111151823.6150.qmail@sources.redhat.com \
    --to=pcarlini@unitus.it \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).