2
respostas

Erro ao rodar projeto no VS Code

Estou usando o VS Code e quando vou abrir o arquivo main do projeto aparece esses erros:

[main.cpp 2022-08-24 15:26:51.164] ,,C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0xb): undefined reference to Conta::recuperaSaldo() const' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x60): undefined reference toConta::sacar(float)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x8e): undefined reference to Autenticavel::autentica(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x1c4): undefined reference toCpf::Cpf(std::cxx11::basic_string<char, std::char_traits, std::allocator >)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x1f1): undefined reference to `Titular::Titular(Cpf, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x2b6): undefined reference to `ContaPoupanca::ContaPoupanca(std::cxx11::basic_string<char, std::char_traits, std::allocator >, Titular)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x2f6): undefined reference to Conta::depositar(float)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x3b5): undefined reference toCpf::Cpf(std::cxx11::basic_string<char, std::char_traits, std::allocator >)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x3e2): undefined reference to `Titular::Titular(Cpf, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x4a1): undefined reference to `ContaCorrente::ContaCorrente(std::cxx11::basic_string<char, std::char_traits, std::allocator >, Titular)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x4de): undefined reference to Conta::depositar(float)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x536): undefined reference toContaCorrente::ContaCorrente(std::cxx11::basic_string<char, std::char_traits, std::allocator >, Titular)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x577): undefined reference to ContaCorrente::transferePara(Conta&, float)' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text+0x59b): undefined reference toConta::recuperaNumeroDeContas()' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text$_ZN13ContaPoupancaD1Ev[ZN13ContaPoupancaD1Ev]+0xa): undefined reference to vtable for ContaPoupanca' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text$_ZN13ContaPoupancaD1Ev[__ZN13ContaPoupancaD1Ev]+0x19): undefined reference toConta::Conta()' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text$ZN13ContaCorrenteD1Ev[__ZN13ContaCorrenteD1Ev]+0xa): undefined reference to `vtable for ContaCorrente' C:\Users\silas\AppData\Local\Temp\ccY9pKUR.o:main.cpp:(.text$ZN13ContaCorrenteD1Ev[__ZN13ContaCorrenteD1Ev]+0x19): undefined reference to `Conta::Conta()' collect2.exe: error: ld returned 1 exit status

2 respostas

Oi Silas.

Seria interessante postar o seu código pra gente ver.

Posta aqui o seu código e utilize o Dev C++ (mais confiável) www.youtube.com/tematicadenerd