Durante a compilação ocorre o seguinte erro:
$gcc -o mdc mdc.cpp
/tmp/ccPSCwBy.o(.text+0x19): In function `main':
: undefined reference to `std::cout'
/tmp/ccPSCwBy.o(.text+0x1e): 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/ccPSCwBy.o(.text+0x2d): In function `main':
: undefined reference to `std::cin'
/tmp/ccPSCwBy.o(.text+0x32): In function `main':
: undefined reference to `std::basic_istream<char, std::char_traits<char> >::operator>>(float&)'
/tmp/ccPSCwBy.o(.text+0x42): In function `main':
: undefined reference to `std::cout'
/tmp/ccPSCwBy.o(.text+0x47): 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/ccPSCwBy.o(.text+0x56): In function `main':
: undefined reference to `std::cin'
/tmp/ccPSCwBy.o(.text+0x5b): In function `main':
: undefined reference to `std::basic_istream<char, std::char_traits<char> >::operator>>(float&)'
/tmp/ccPSCwBy.o(.text+0x8d): In function `main':
: undefined reference to `std::cout'
/tmp/ccPSCwBy.o(.text+0x92): 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/ccPSCwBy.o(.text+0x9b): In function `main':
: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(float)'
/tmp/ccPSCwBy.o(.text+0xa4): 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/ccPSCwBy.o(.text+0x11e): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccPSCwBy.o(.text+0x14d): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/ccPSCwBy.o(.gnu.linkonce.t._ZSt4fmodff+0x10): In function `std::fmod(float, float)':
: undefined reference to `fmodf'
/tmp/ccPSCwBy.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
Pergunta
psybox
Este é um programa para calcular o máximo divisor comum entre dois números:
Durante a compilação ocorre o seguinte erro: $gcc -o mdc mdc.cppDesde já agradeço a todos..
Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.