* Re: libstdc++ can not working correct yet...
@ 2002-08-13 6:49 Keen Wayne A Contr AFRL/MNGG
0 siblings, 0 replies; 2+ messages in thread
From: Keen Wayne A Contr AFRL/MNGG @ 2002-08-13 6:49 UTC (permalink / raw)
To: 'gcc-help@gcc.gnu.org'
The code in question compiles and runs successfully using:
g++ -o striner striner.cpp.cpp
where striner.cpp is the sourcefile I copied your code into.
I am testing on a pc running Cygwin and gcc-3.1.1. If you use:
gcc -o striner striner.cpp
It generates a lot of errors, in my case something like:
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x34):strin
er.cpp: undefined reference to
`std::allocator<char>::allocator[in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x4e):strin
er.cpp: undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string[in-charge](char
const*, std::allocator<char> const&)'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x61):strin
er.cpp: undefined reference to `std::allocator<char>::~allocator
[in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x7a):strin
er.cpp: undefined reference to `std::allocator<char>::~allocator
[in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x81):strin
er.cpp: undefined reference to `std::cout'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x8d):strin
er.cpp: 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&)'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x98):strin
er.cpp: undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::endl<char, std::char_traits<char>
>(std::basic_ostream<char, std::char_traits<char> >&)'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x9d):strin
er.cpp: 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> >&))'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0xa4):strin
er.cpp: undefined reference to `std::cin'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0xb0):strin
er.cpp: undefined reference to `std::basic_istream<char,
std::char_traints<char> >::operator>>(int&)'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0xbb):strin
er.cpp: undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string [in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0xce):strin
er.cpp: undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string [in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x107):stri
ner.cpp: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.text+0x122):stri
ner.cpp: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/cygdrive/c/DOCUME~1/KEENWA~1.EGL/LOCALS~1/Temp/ccoNDCI6.o(.eh_frame+0x12):s
triner.cpp: undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status
This is expected, as the g++ command grabs more C++ specific items to link.
Hope that helps.
Wayne
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libstdc++ can not working correct yet...
[not found] <kE979186894453.18797@webmail2.inner-21cn.com>
@ 2002-08-12 23:39 ` Christoph Bugel
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Bugel @ 2002-08-12 23:39 UTC (permalink / raw)
To: TARZAN LION; +Cc: gcc-help, libstdc++
On 2002-08-13, TARZAN LION wrote:
> hi:
> my libstdc++ can not working correct yet,I do the following step:
>
> #include <iostream>
> #include <string>
> using namespace std;
> int main()
> {
> string str("hello world!");
> cout<<str<<endl;
> return 0;
> }
Hi,
This is not a libstdc++ issue, its a generic GCC question.
I CC'd this to the gcc-help mailing list. Let's continue
the discussion there, instead of bothering this mailing
list, ok?
> but it can not working correct,many error report show me on the screen.some error report like this:
You didn't send the actual error messages, so I can't
really help you ;-). Are you sure you are compiling with g++
and not with gcc?
And as for gcc installations instructions, you can find them
on them website gcc.gnu.org
> can you help me? I love gnu, I love linux, I love you everybody! help me! help me......
:-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-13 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-13 6:49 libstdc++ can not working correct yet Keen Wayne A Contr AFRL/MNGG
[not found] <kE979186894453.18797@webmail2.inner-21cn.com>
2002-08-12 23:39 ` Christoph Bugel
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).