Compiler throwing a ton of errors. Happening in both Codecademy and Clion

I keep getting this error in terminal when I compile the program. Cannot fix it. I’m on MacOS 13.2. I’m at a loss for words on how to fix this. I’ve tried for 3 hours now to find a solution…

/tmp/ccMnH16i.o: In function `main':
ufo.cpp:(.text+0x1c): undefined reference to `greet()'
ufo.cpp:(.text+0x4b): undefined reference to `rand_codeword[abi:cxx11]()'
ufo.cpp:(.text+0x74): undefined reference to `cwUnderscore(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
ufo.cpp:(.text+0xc4): undefined reference to `display_misses(int)'
ufo.cpp:(.text+0x106): undefined reference to `display_status(std::vector<char, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
ufo.cpp:(.text+0x266): undefined reference to `end_game(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: error: ld returned 1 exit status

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.