-
-
Save DudekJoshua/89b075b7d445efe7371327e0958c9988 to your computer and use it in GitHub Desktop.
When I run clang main.cpp I get this error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/ld: /tmp/main-ad7332.o: in function `main': | |
main.cpp:(.text+0x11): undefined reference to `std::cout' | |
/usr/bin/ld: main.cpp:(.text+0x24): 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*)' | |
/usr/bin/ld: main.cpp:(.text+0x2d): 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> >&)' | |
/usr/bin/ld: main.cpp:(.text+0x36): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))' | |
/usr/bin/ld: /tmp/main-ad7332.o: in function `__cxx_global_var_init': | |
main.cpp:(.text.startup+0x13): undefined reference to `std::ios_base::Init::Init()' | |
/usr/bin/ld: main.cpp:(.text.startup+0x19): undefined reference to `std::ios_base::Init::~Init()' | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment