[Bug c++/41111] New: c++ problems to compile

jaamfi at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 18 19:49:00 GMT 2009


Im running Debian Etch, gcc 4.1.2
Im studying c++, and just wrote a very basic code.
Then I tried to compile.

#gcc teste.cpp
and got this message:

gcc: error trying to exec 'cc1plus': execvp: Arquivo ou diretório não
encontrado

Ok, so I installed g++.

#aptitude install g++

and tried to compile again.

#gcc -x c++ teste.cpp -save-temps

and now i have this bigger message:

teste.o: In function `__static_initialization_and_destruction_0(int, int)':
teste.cpp:(.text+0x23): undefined reference to `std::ios_base::Init::Init()'
teste.o: In function `__tcf_0':
teste.cpp:(.text+0x6c): undefined reference to `std::ios_base::Init::~Init()'
teste.o: In function `main':
teste.cpp:(.text+0x8e): undefined reference to `std::cout'
teste.cpp:(.text+0x93): 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*)'
teste.cpp:(.text+0x9b): 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> >&)'
teste.cpp:(.text+0xa3): 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>
>&))'
teste.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

And I got these 3 archs, teste.o teste.ii teste.s (from the -save-temps)

Any ideas?


-- 
           Summary: c++ problems to compile
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jaamfi at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41111



More information about the Gcc-bugs mailing list