10/09/2008, 21:29
|
| | Fecha de Ingreso: septiembre-2008
Mensajes: 11
Antigüedad: 16 años, 2 meses Puntos: 0 | |
Respuesta: iniciando en c++ para linux haciendo eso me produce aun mas error..
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n";
return 0;
}
jadder@jadder-desktop:~/c$ gcc hello.cxx -o hi
hello.cxx:6: error: expected unqualified-id before ‘{’ token
jadder@jadder-desktop:~/c$
jadder@jadder-desktop:~/c$ gcc hello.cxx -o hi
/tmp/cc9tb6Pz.o: In function `std::__verify_grouping(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
hello.cxx:(.text+0xe): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
hello.cxx:(.text+0x59): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
hello.cxx:(.text+0x97): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
hello.cxx:(.text+0xdf): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned int) const'
/tmp/cc9tb6Pz.o: In function `main':
hello.cxx:(.text+0x128): undefined reference to `std::cout'
hello.cxx:(.text+0x12d): 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/cc9tb6Pz.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cxx:(.text+0x15d): undefined reference to `std::ios_base::Init::Init()'
/tmp/cc9tb6Pz.o: In function `__tcf_0':
hello.cxx:(.text+0x1aa): undefined reference to `std::ios_base::Init::~Init()'
/tmp/cc9tb6Pz.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
jadder@jadder-desktop:~/c$
que pudiera hacer |