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@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] På > vegne av Jesus Eduardo Lidanski > Sendt: 4. mai 2004 00:20 > Til: gcc-help@xxxxxxxxxxx > 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