public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* c++ compiling
@ 2004-05-03 22:18 Jesus Eduardo Lidanski
  2004-05-03 22:37 ` SV: " Sigurd Saue
  0 siblings, 1 reply; 6+ messages in thread
From: Jesus Eduardo Lidanski @ 2004-05-03 22:18 UTC (permalink / raw)
  To: gcc-help

hello!
i have a very strange problem, please help me.
i tried to compile a c++ program:

#include <iostream>
using namespace std;


int main()
{
   cout << "Hello World!\n";
   return 0;
}

and everything was okay ....
the next day i tried to compile another program, a basic program, but it gave 
me a lot of errors, and i tried to compile another time my first program... 
and i got the following errors:

jesus_edu@linux:~/Documents/C++> gcc prueba.cpp
/tmp/ccIan2q6.o(.text+0xd): In function `std::__verify_grouping(char const*, 
uns
igned int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>
> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a
llocator<char> >::size() const'
/tmp/ccIan2q6.o(.text+0x60): In function `std::__verify_grouping(char const*, 
un
signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>
 > const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a
llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0x9f): In function `std::__verify_grouping(char const*, 
un
signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>                                                                             
> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a                                                                            
llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0xce): In function `std::__verify_grouping(char const*, 
un                                                                            
signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>                                                                             
> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a                                                                            
llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0x127): In function `main':
: undefined reference to `std::cout'
/tmp/ccIan2q6.o(.text+0x12c): In function `main':
: 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*)'
/tmp/ccIan2q6.o(.text+0x155): In function 
`__static_initialization_and_destructi                                                                            
on_0(int, int)':
: undefined reference to `std::ios_base::Init::Init()'
/tmp/ccIan2q6.o(.text+0x170): In function 
`__static_initialization_and_destructi                                                                            
on_0(int, int)':
: undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccIan2q6.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
jesus_edu@linux:~/Documents/C++>


what ist this?? how can i compile programs ? why do i get these errors?
thanks,
eduardo lidanski

^ permalink raw reply	[flat|nested] 6+ messages in thread

* SV: c++ compiling
  2004-05-03 22:18 c++ compiling Jesus Eduardo Lidanski
@ 2004-05-03 22:37 ` Sigurd Saue
  2004-05-03 22:46   ` Jesus Eduardo Lidanski
  2004-05-03 23:07   ` Jesus Eduardo Lidanski
  0 siblings, 2 replies; 6+ messages in thread
From: Sigurd Saue @ 2004-05-03 22:37 UTC (permalink / raw)
  To: gcc-help

Use g++ instead of gcc.

Sigurd

-----Opprinnelig melding-----
Fra: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] På vegne
av Jesus Eduardo Lidanski
Sendt: 4. mai 2004 00:20
Til: gcc-help@gcc.gnu.org
Emne: c++ compiling

hello!
i have a very strange problem, please help me.
i tried to compile a c++ program:

#include <iostream>
using namespace std;


int main()
{
   cout << "Hello World!\n";
   return 0;
}

and everything was okay ....
the next day i tried to compile another program, a basic program, but it
gave 
me a lot of errors, and i tried to compile another time my first program... 
and i got the following errors:

jesus_edu@linux:~/Documents/C++> gcc prueba.cpp
/tmp/ccIan2q6.o(.text+0xd): In function `std::__verify_grouping(char const*,

uns
igned int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>
> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a
llocator<char> >::size() const'
/tmp/ccIan2q6.o(.text+0x60): In function `std::__verify_grouping(char
const*, 
un
signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>
 > const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a
llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0x9f): In function `std::__verify_grouping(char
const*, 
un
signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>

> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a

llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0xce): In function `std::__verify_grouping(char
const*, 
un

signed int, std::basic_string<char, std::char_traits<char>, 
std::allocator<char>

> const&)':
: undefined reference to `std::basic_string<char, std::char_traits<char>, 
std::a

llocator<char> >::operator[](unsigned int) const'
/tmp/ccIan2q6.o(.text+0x127): In function `main':
: undefined reference to `std::cout'
/tmp/ccIan2q6.o(.text+0x12c): In function `main':
: 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*)'
/tmp/ccIan2q6.o(.text+0x155): In function 
`__static_initialization_and_destructi

on_0(int, int)':
: undefined reference to `std::ios_base::Init::Init()'
/tmp/ccIan2q6.o(.text+0x170): In function 
`__static_initialization_and_destructi

on_0(int, int)':
: undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccIan2q6.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
jesus_edu@linux:~/Documents/C++>


what ist this?? how can i compile programs ? why do i get these errors?
thanks,
eduardo lidanski


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SV: c++ compiling
  2004-05-03 22:37 ` SV: " Sigurd Saue
@ 2004-05-03 22:46   ` Jesus Eduardo Lidanski
  2004-05-03 23:07   ` Jesus Eduardo Lidanski
  1 sibling, 0 replies; 6+ messages in thread
From: Jesus Eduardo Lidanski @ 2004-05-03 22:46 UTC (permalink / raw)
  To: gcc-help

i tried both methods u already told me , but now i get this error:

jesus_edu@linux:~/Documents> g++ -o prueba prueba.cpp
jesus_edu@linux:~/Documents> ./prueba
./prueba: error while loading shared libraries: libstdc++.so.6: cannot open 
shared object file: No such file or directory
jesus_edu@linux:~/Documents>

On Tuesday 04 May 2004 00:36, Sigurd Saue wrote:
> Use g++ instead of gcc.
>
> Sigurd
>
> -----Opprinnelig melding-----
> Fra: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] På
> vegne av Jesus Eduardo Lidanski
> Sendt: 4. mai 2004 00:20
> Til: gcc-help@gcc.gnu.org
> Emne: c++ compiling
>
> hello!
> i have a very strange problem, please help me.
> i tried to compile a c++ program:
>
> #include <iostream>
> using namespace std;
>
>
> int main()
> {
>    cout << "Hello World!\n";
>    return 0;
> }
>
> and everything was okay ....
> the next day i tried to compile another program, a basic program, but it
> gave
> me a lot of errors, and i tried to compile another time my first program...
> and i got the following errors:
>
> jesus_edu@linux:~/Documents/C++> gcc prueba.cpp
> /tmp/ccIan2q6.o(.text+0xd): In function `std::__verify_grouping(char
> const*,
>
> uns
> igned int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::size() const'
> /tmp/ccIan2q6.o(.text+0x60): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
>  > const&)':
> :
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0x9f): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0xce): In function `std::__verify_grouping(char
> const*,
> un
>
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
>
> /tmp/ccIan2q6.o(.text+0x127): In function `main':
> : undefined reference to `std::cout'
>
> /tmp/ccIan2q6.o(.text+0x12c): In function `main':
> : 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*)'
> /tmp/ccIan2q6.o(.text+0x155): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::Init()'
>
> /tmp/ccIan2q6.o(.text+0x170): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::~Init()'
>
> /tmp/ccIan2q6.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
> jesus_edu@linux:~/Documents/C++>
>
>
> what ist this?? how can i compile programs ? why do i get these errors?
> thanks,
> eduardo lidanski

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SV: c++ compiling
  2004-05-03 22:37 ` SV: " Sigurd Saue
  2004-05-03 22:46   ` Jesus Eduardo Lidanski
@ 2004-05-03 23:07   ` Jesus Eduardo Lidanski
  2004-05-04 13:17     ` Eljay Love-Jensen
  2004-05-04 13:20     ` SV: " Sigurd Saue
  1 sibling, 2 replies; 6+ messages in thread
From: Jesus Eduardo Lidanski @ 2004-05-03 23:07 UTC (permalink / raw)
  To: gcc-help

i restarted my pc and everything's okay... i compile now with g++ ... thanks a 
lot for the help..
a curiosity, why doesn't it work with gcc? 
Eduardo Lidanski


On Tuesday 04 May 2004 00:36, Sigurd Saue wrote:
> Use g++ instead of gcc.
>
> Sigurd
>
> -----Opprinnelig melding-----
> Fra: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] På
> vegne av Jesus Eduardo Lidanski
> Sendt: 4. mai 2004 00:20
> Til: gcc-help@gcc.gnu.org
> Emne: c++ compiling
>
> hello!
> i have a very strange problem, please help me.
> i tried to compile a c++ program:
>
> #include <iostream>
> using namespace std;
>
>
> int main()
> {
>    cout << "Hello World!\n";
>    return 0;
> }
>
> and everything was okay ....
> the next day i tried to compile another program, a basic program, but it
> gave
> me a lot of errors, and i tried to compile another time my first program...
> and i got the following errors:
>
> jesus_edu@linux:~/Documents/C++> gcc prueba.cpp
> /tmp/ccIan2q6.o(.text+0xd): In function `std::__verify_grouping(char
> const*,
>
> uns
> igned int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::size() const'
> /tmp/ccIan2q6.o(.text+0x60): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
>  > const&)':
> :
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0x9f): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0xce): In function `std::__verify_grouping(char
> const*,
> un
>
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
>
> /tmp/ccIan2q6.o(.text+0x127): In function `main':
> : undefined reference to `std::cout'
>
> /tmp/ccIan2q6.o(.text+0x12c): In function `main':
> : 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*)'
> /tmp/ccIan2q6.o(.text+0x155): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::Init()'
>
> /tmp/ccIan2q6.o(.text+0x170): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::~Init()'
>
> /tmp/ccIan2q6.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
> jesus_edu@linux:~/Documents/C++>
>
>
> what ist this?? how can i compile programs ? why do i get these errors?
> thanks,
> eduardo lidanski

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SV: c++ compiling
  2004-05-03 23:07   ` Jesus Eduardo Lidanski
@ 2004-05-04 13:17     ` Eljay Love-Jensen
  2004-05-04 13:20     ` SV: " Sigurd Saue
  1 sibling, 0 replies; 6+ messages in thread
From: Eljay Love-Jensen @ 2004-05-04 13:17 UTC (permalink / raw)
  To: Jesus Eduardo Lidanski, gcc-help

Hi Jesus,

 >a curiosity, why doesn't it work with gcc?

Because "gcc" doesn't include the C++ stuff.

What's the "C++ stuff"?  Varies, depending on platform and GCC version.

You can use the "-v" switch with "gcc" and "g++" to ascertain the differences.

--Eljay

^ permalink raw reply	[flat|nested] 6+ messages in thread

* SV: SV: c++ compiling
  2004-05-03 23:07   ` Jesus Eduardo Lidanski
  2004-05-04 13:17     ` Eljay Love-Jensen
@ 2004-05-04 13:20     ` Sigurd Saue
  1 sibling, 0 replies; 6+ messages in thread
From: Sigurd Saue @ 2004-05-04 13:20 UTC (permalink / raw)
  To: gcc-help

gcc is the "GNU" C Compiler, and g++ is the "GNU C++ compiler.

Sigurd

-----Opprinnelig melding-----
Fra: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] På vegne
av Jesus Eduardo Lidanski
Sendt: 4. mai 2004 01:10
Til: gcc-help@gcc.gnu.org
Emne: Re: SV: c++ compiling

i restarted my pc and everything's okay... i compile now with g++ ... thanks
a 
lot for the help..
a curiosity, why doesn't it work with gcc? 
Eduardo Lidanski


On Tuesday 04 May 2004 00:36, Sigurd Saue wrote:
> Use g++ instead of gcc.
>
> Sigurd
>
> -----Opprinnelig melding-----
> Fra: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] På
> vegne av Jesus Eduardo Lidanski
> Sendt: 4. mai 2004 00:20
> Til: gcc-help@gcc.gnu.org
> Emne: c++ compiling
>
> hello!
> i have a very strange problem, please help me.
> i tried to compile a c++ program:
>
> #include <iostream>
> using namespace std;
>
>
> int main()
> {
>    cout << "Hello World!\n";
>    return 0;
> }
>
> and everything was okay ....
> the next day i tried to compile another program, a basic program, but it
> gave
> me a lot of errors, and i tried to compile another time my first
program...
> and i got the following errors:
>
> jesus_edu@linux:~/Documents/C++> gcc prueba.cpp
> /tmp/ccIan2q6.o(.text+0xd): In function `std::__verify_grouping(char
> const*,
>
> uns
> igned int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::size() const'
> /tmp/ccIan2q6.o(.text+0x60): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
>  > const&)':
> :
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0x9f): In function `std::__verify_grouping(char
> const*,
> un
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
> /tmp/ccIan2q6.o(.text+0xce): In function `std::__verify_grouping(char
> const*,
> un
>
> signed int, std::basic_string<char, std::char_traits<char>,
> std::allocator<char>
>
> > const&)':
> >
> : undefined reference to `std::basic_string<char, std::char_traits<char>,
>
> std::a
>
> llocator<char> >::operator[](unsigned int) const'
>
> /tmp/ccIan2q6.o(.text+0x127): In function `main':
> : undefined reference to `std::cout'
>
> /tmp/ccIan2q6.o(.text+0x12c): In function `main':
> : 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*)'
> /tmp/ccIan2q6.o(.text+0x155): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::Init()'
>
> /tmp/ccIan2q6.o(.text+0x170): In function
> `__static_initialization_and_destructi
>
> on_0(int, int)':
> : undefined reference to `std::ios_base::Init::~Init()'
>
> /tmp/ccIan2q6.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
> jesus_edu@linux:~/Documents/C++>
>
>
> what ist this?? how can i compile programs ? why do i get these errors?
> thanks,
> eduardo lidanski


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-04 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-03 22:18 c++ compiling Jesus Eduardo Lidanski
2004-05-03 22:37 ` SV: " Sigurd Saue
2004-05-03 22:46   ` Jesus Eduardo Lidanski
2004-05-03 23:07   ` Jesus Eduardo Lidanski
2004-05-04 13:17     ` Eljay Love-Jensen
2004-05-04 13:20     ` SV: " Sigurd Saue

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).